[−][src]Struct prometrics::label::LabelsMut
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
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]
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, 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>,