Skip to main content

with_label

Function with_label 

Source
pub fn with_label<K, V, F, Ret>(k: K, v: V, f: F) -> Ret
where K: AsRef<[u8]>, V: AsRef<[u8]>, F: FnOnce() -> Ret,
Expand description

Set the label for the specified key to the specified value while the given function is running.

All labels are thread-local: setting a label on one thread has no effect on its value on any other thread.