[][src]Trait opentracingrust::MapCarrier

pub trait MapCarrier {
    fn items(&self) -> Vec<(&String, &String)>;
fn get(&self, key: &str) -> Option<String>;
fn set(&mut self, key: &str, value: &str); }

Interface for HTTP header and text map carriers.

A trait used by InjectFormat and ExtractFormat to store carriers that support the HttpHeaders and the TextMap formats.

Required methods

fn items(&self) -> Vec<(&String, &String)>

List all items stored in the carrier as (key, value) pairs.

Intended to be used by the ExtractFormats to extract all the baggage items from the carrier.

fn get(&self, key: &str) -> Option<String>

Attempt to fetch an exact key from the carrier.

fn set(&mut self, key: &str, value: &str)

Set a key/value pair on the carrier.

Loading content...

Implementations on Foreign Types

impl MapCarrier for HashMap<String, String>[src]

impl MapCarrier for BTreeMap<String, String>[src]

Loading content...

Implementors

Loading content...