pub enum TryInitError {
AlreadyInit,
WouldBlock,
}
Expand description
Possible error variants of non-blocking initialization calls.
Variants§
AlreadyInit
The OnceCell
is already initialized and the initialization procedure
was not called.
WouldBlock
The OnceCell
is currently being initialized by another thread and
the current thread would have to block.
Trait Implementations§
Source§impl Clone for TryInitError
impl Clone for TryInitError
Source§fn clone(&self) -> TryInitError
fn clone(&self) -> TryInitError
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TryInitError
impl Debug for TryInitError
Source§impl Display for TryInitError
impl Display for TryInitError
Source§impl Error for TryInitError
impl Error for TryInitError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Hash for TryInitError
impl Hash for TryInitError
Source§impl Ord for TryInitError
impl Ord for TryInitError
Source§fn cmp(&self, other: &TryInitError) -> Ordering
fn cmp(&self, other: &TryInitError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TryInitError
impl PartialEq for TryInitError
Source§impl PartialOrd for TryInitError
impl PartialOrd for TryInitError
impl Copy for TryInitError
impl Eq for TryInitError
impl StructuralPartialEq for TryInitError
Auto Trait Implementations§
impl Freeze for TryInitError
impl RefUnwindSafe for TryInitError
impl Send for TryInitError
impl Sync for TryInitError
impl Unpin for TryInitError
impl UnwindSafe for TryInitError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more