Skip to main content

with_labels

Function with_labels 

Source
pub fn with_labels<I, K, V, F, Ret>(i: I, f: F) -> Ret
where I: IntoIterator<Item = (K, V)>, K: AsRef<[u8]>, V: AsRef<[u8]>, F: FnOnce() -> Ret,
Expand description

Set the labels for the specified keys to the specified values while the given function is running.

i is an iterator of key-value pairs.

The effect is the same as repeatedly nesting calls to the singular with_label.