Enum task_local::StorageError
source · [−]pub enum StorageError {
NoValue,
Locked,
}
Expand description
An error that is returned from the TaskLocal::try_*
methods if the
local value cannot be accessed.
Variants
NoValue
There is no value in storage. This means that you are not in a thread of
execution that is not wrapped in a TaskLocalFuture
.
Locked
The storage cannot be accessed because it is currently locked. This can happen if you call the free methods recursively and at least one of them is accessing the storage mutably.
Trait Implementations
sourceimpl Clone for StorageError
impl Clone for StorageError
sourcefn clone(&self) -> StorageError
fn clone(&self) -> StorageError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StorageError
impl Debug for StorageError
impl Copy for StorageError
Auto Trait Implementations
impl RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl UnwindSafe for StorageError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more