[][src]Struct dipstick::Labels

pub struct Labels { /* fields omitted */ }

Base structure to carry metric labels from the application to the metric backend(s). Can carry both one-off labels and exported context labels (if async metrics are enabled). Used in applications through the labels!() macro.

Methods

impl Labels
[src]

pub fn save_context(&mut self)
[src]

Used to save metric context before enqueuing value for async output.

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

Generic label lookup function. Searches provided labels, provided scopes or default scopes.

pub fn into_map(self) -> HashMap<String, Arc<String>>
[src]

Export current state of labels to a map. Note: An iterator would still need to allocate to check for uniqueness of keys.

Trait Implementations

impl From<HashMap<String, Arc<String>, RandomState>> for Labels
[src]

impl Default for Labels
[src]

fn default() -> Self
[src]

Create empty labels. Only Thread and App labels will be used for lookups.

impl Clone for Labels
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Labels
[src]

Auto Trait Implementations

impl Send for Labels

impl Sync for Labels

Blanket Implementations

impl<T> From for T
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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