Expand description
Manage the thread local primary handler.
Statics§
- DEFAULT_
THREAD_ LOCAL_ PRIMARY_ HANDLER - The default thread local primary handler.
Functions§
- install
- Install a new thread local primary handler.
- install_
dyn - Install a new thread local primary handler. Must be a dynamic trait object.
- read
- Get a reference to the current thread local primary handler.
- read_
or_ default - Get a reference to the current thread local primary handler.
- replace
- Replace the current thread local primary handler with the given one, returning the old one if any.
- replace_
dyn - Replace the current thread local primary handler with the given one, returning the old one if any. Must be a dynamic trait object.
- scope
- Sets the thread local primary handler to the given one for the duration of the given scope.
For more advanced usage, see the
ScopeGuardtype. - scope_
dyn - Sets the thread local primary handler to the given one for the duration of the given scope.
For more advanced usage, see the
ScopeGuardtype. Must be a dynamic trait object. - take
- Take the current thread local primary handler, if there is any initalized.
- try_
read - Try and get a reference to the current thread local primary handler.
- try_
write - Try and get a mutable reference to the current thread local primary handler.
- uninstall
- Uninstall the current thread local primary handler.
- write
- Get a mutable reference to the current thread local primary handler.
- write_
or_ default - Get a mutable reference to the current thread local primary handler.
Type Aliases§
- BoxDyn
Fallible TryDrop Strategy - Handy type alias to
Box<dyn ThreadLocalFallibleTryDropStrategy>. - Scope
Guard - A scope guard for the thread local primary handler. It is used to set the thread local primary handler for the duration of the scope.
- Thread
Local Primary Handler - A primary handler that uses the thread local scope.