Skip to main content

set_item

Function set_item 

Source
pub fn set_item<T: 'static>(item: T)
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.