Enum opentracingrust::InjectFormat [] [src]

pub enum InjectFormat<'a> {
    Binary(Box<&'a mut Write>),
    HttpHeaders(Box<&'a mut MapCarrier>),
    TextMap(Box<&'a mut 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