[][src]Enum opentracingrust::ExtractFormat

pub enum ExtractFormat<'a> {
    Binary(Box<&'a mut dyn Read>),
    HttpHeaders(Box<&'a dyn MapCarrier>),
    TextMap(Box<&'a dyn MapCarrier>),
}

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> !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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,