Expand description
Manage the thread local fallback handler.
Statics§
- DEFAULT_
THREAD_ LOCAL_ FALLBACK_ HANDLER - The default thread local fallback handler.
Functions§
- install
- Install a new fallback thread local handler.
- install_
dyn - Install a new fallback thread local handler. Must be a dynamic trait object.
- read
- Get a reference to the current fallback thread local handler.
- read_
or_ default - Get a reference to the current fallback thread local handler.
- replace
- Replace the current fallback thread local handler with a new one, returning the old one if any.
- replace_
dyn - Replace the current fallback thread local handler with a new one, returning the old one if any. Must be a dynamic trait object.
- scope
- Sets the fallback thread local handler to the specified one for the duration of the scope.
- scope_
dyn - Sets the fallback thread local handler to the specified one for the duration of the scope. Must be a dynamic trait object.
- take
- Take the current fallback thread local handler, if there is any.
- try_
read - Try to get a reference to the current fallback thread local handler.
- try_
write - Try to get a mutable reference to the current fallback thread local handler.
- uninstall
- Uninstall the current fallback thread local handler.
- write
- Get a mutable reference to the current fallback thread local handler.
- write_
or_ default - Get a mutable reference to the current fallback thread local handler.
Type Aliases§
- BoxDyn
TryDrop Strategy - A handy type alias for
Box<dyn ThreadLocalTryDropStrategy>. - Scope
Guard - A scope guard for the thread local fallback handler. This sets the thread local fallback handler to the one specified for the duration of the scope.
- Thread
Local Fallback Handler - A fallback handler that uses the thread local scope.