pub trait WithHttpConfig {
// Required methods
fn with_http_client<T: HttpClient + 'static>(self, client: T) -> Self;
fn with_headers(self, headers: HashMap<String, String>) -> Self;
}
Expand description
This trait will be implemented for every struct that implemented HasHttpConfig
trait.
§Examples
use crate::opentelemetry_otlp::WithHttpConfig;
let exporter_builder = opentelemetry_otlp::SpanExporter::builder()
.with_http()
.with_headers(std::collections::HashMap::new());
Required Methods§
sourcefn with_http_client<T: HttpClient + 'static>(self, client: T) -> Self
fn with_http_client<T: HttpClient + 'static>(self, client: T) -> Self
Assign client implementation
sourcefn with_headers(self, headers: HashMap<String, String>) -> Self
fn with_headers(self, headers: HashMap<String, String>) -> Self
Set additional headers to send to the collector.
Object Safety§
This trait is not object safe.