[][src]Struct prometrics::label::LabelsMut

pub struct LabelsMut<'a> { /* fields omitted */ }

A mutable map of labels (i.e., key-value pairs).

Methods

impl<'a> LabelsMut<'a>[src]

pub fn insert(&mut self, name: &str, value: &str) -> Result<()>[src]

Inserts the label.

pub fn remove(&mut self, name: &str)[src]

Removes the label which has the name name if it exists.

pub fn clear(&mut self)[src]

Clears the all labels.

Methods from Deref<Target = Labels>

pub fn len(&self) -> usize[src]

Returns the number of labels contained in this map.

pub fn is_empty(&self) -> bool[src]

Returns true if this map has no labels, otherwise false.

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

Returns the label which has the name name.

pub fn iter(&self) -> Iter[src]

Returns an iterator which visiting all labels in this map.

Trait Implementations

impl<'a> Debug for LabelsMut<'a>[src]

impl<'a> Deref for LabelsMut<'a>[src]

type Target = Labels

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a> RefUnwindSafe for LabelsMut<'a>

impl<'a> Send for LabelsMut<'a>

impl<'a> Sync for LabelsMut<'a>

impl<'a> Unpin for LabelsMut<'a>

impl<'a> UnwindSafe for LabelsMut<'a>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.