[][src]Trait opentelemetry::propagation::Extractor

pub trait Extractor {
    pub fn get(&self, key: &str) -> Option<&str>;
pub fn keys(&self) -> Vec<&str>; }

Extractor provides an interface for removing fields from an underlying struct like HashMap

Required methods

pub fn get(&self, key: &str) -> Option<&str>[src]

Get a value from a key from the underlying data.

pub fn keys(&self) -> Vec<&str>[src]

Collect all the keys from the underlying data.

Loading content...

Implementations on Foreign Types

impl<S: BuildHasher> Extractor for HashMap<String, String, S>[src]

pub fn get(&self, key: &str) -> Option<&str>[src]

Get a value for a key from the HashMap.

pub fn keys(&self) -> Vec<&str>[src]

Collect all the keys from the HashMap.

impl Extractor for HeaderMap[src]

This is supported on crate feature http only.

pub fn get(&self, key: &str) -> Option<&str>[src]

Get a value for a key from the HeaderMap. If the value is not valid ASCII, returns None.

pub fn keys(&self) -> Vec<&str>[src]

Collect all the keys from the HeaderMap.

impl Extractor for MetadataMap[src]

This is supported on crate feature tonic only.

pub fn get(&self, key: &str) -> Option<&str>[src]

Get a value for a key from the MetadataMap. If the value can't be converted to &str, returns None

pub fn keys(&self) -> Vec<&str>[src]

Collect all the keys from the MetadataMap.

Loading content...

Implementors

Loading content...