Skip to main content

set_item

Function set_item 

Source
pub fn set_item<T>(item: T)
where T: 'static,
Expand description

Inserts a value into the current arbiter’s thread-local storage.

Values are keyed by type. Replaces and drops any previous value of type T; the previous value is dropped after releasing the storage borrow.

If the storage has already been destroyed because the thread is exiting, the value is dropped.