pub enum ExtractFormat<'a> {
Binary(Box<&'a mut dyn Read>),
HttpHeaders(Box<&'a dyn MapCarrier>),
TextMap(Box<&'a dyn MapCarrier>),
}
Expand description
SpanContext
extraction format and source.
Each supported extraction format also carries an object trait to
the data carrier the SpanContext
should be extracted from.
§Examples
extern crate opentracingrust;
use std::collections::HashMap;
use opentracingrust::ExtractFormat;
fn main() {
let mut headers: HashMap<String, String> = HashMap::new();
headers.insert(String::from("TraceId"), String::from("123"));
headers.insert(String::from("SpanId"), String::from("456"));
let format = ExtractFormat::HttpHeaders(Box::new(&headers));
// ... snip ...
}
Variants§
Binary(Box<&'a mut dyn Read>)
HttpHeaders(Box<&'a dyn MapCarrier>)
TextMap(Box<&'a dyn MapCarrier>)
Auto Trait Implementations§
impl<'a> Freeze for ExtractFormat<'a>
impl<'a> !RefUnwindSafe for ExtractFormat<'a>
impl<'a> !Send for ExtractFormat<'a>
impl<'a> !Sync for ExtractFormat<'a>
impl<'a> Unpin for ExtractFormat<'a>
impl<'a> !UnwindSafe for ExtractFormat<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more