[][src]Enum opentracingrust::InjectFormat

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

SpanContext injection format and destination.

Each supported injection format also carries an object trait to the data carrier the SpanContext should be injected into.

Examples

extern crate opentracingrust;

use std::collections::HashMap;
use opentracingrust::InjectFormat;


fn main() {
    let mut headers: HashMap<String, String> = HashMap::new();
    let format = InjectFormat::HttpHeaders(Box::new(&mut headers)); 
    // ... snip ...
}

Variants

Binary(Box<&'a mut dyn Write>)
HttpHeaders(Box<&'a mut dyn MapCarrier>)
TextMap(Box<&'a mut dyn MapCarrier>)

Auto Trait Implementations

impl<'a> !RefUnwindSafe for InjectFormat<'a>

impl<'a> !Send for InjectFormat<'a>

impl<'a> !Sync for InjectFormat<'a>

impl<'a> Unpin for InjectFormat<'a>

impl<'a> !UnwindSafe for InjectFormat<'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>,