Skip to main content

with_item

Function with_item 

Source
pub fn with_item<T, F, R>(f: F) -> R
where T: Default + 'static, F: FnOnce(&T) -> R,
Expand description

Provides access to a value in the current arbiter’s thread-local storage.

A default value is inserted if the requested type is not already present. If the storage has already been destroyed because the thread is exiting, f receives a temporary default value that is not stored.