[−][src]Struct dipstick::Labels
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.
Implementations
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 Clone for Labels
[src]
impl Debug for Labels
[src]
impl Default for Labels
[src]
impl From<HashMap<String, Arc<String>, RandomState>> for Labels
[src]
Auto Trait Implementations
impl RefUnwindSafe for Labels
impl Send for Labels
impl Sync for Labels
impl Unpin for Labels
impl UnwindSafe for Labels
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,