Struct prometrics::label::LabelsMut
[−]
[src]
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
.
ⓘImportant traits for Iter<'a>pub fn iter(&self) -> Iter
[src]
ⓘImportant traits for Iter<'a>
Returns an iterator which visiting all labels in this map.
Trait Implementations
impl<'a> Debug for LabelsMut<'a>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more