Enum local_sync::SetError
source · pub enum SetError<T> {
AlreadyInitializedError(T),
InitializingError(T),
}
Expand description
Errors that can be returned from OnceCell::set
.
Variants§
AlreadyInitializedError(T)
The cell was already initialized when OnceCell::set
was called.
InitializingError(T)
The cell is currently being initialized.
Implementations§
source§impl<T> SetError<T>
impl<T> SetError<T>
sourcepub fn is_already_init_err(&self) -> bool
pub fn is_already_init_err(&self) -> bool
Whether SetError
is SetError::AlreadyInitializedError
.
sourcepub fn is_initializing_err(&self) -> bool
pub fn is_initializing_err(&self) -> bool
Whether SetError
is SetError::InitializingError
Trait Implementations§
source§impl<T: Debug> Error for SetError<T>
impl<T: Debug> Error for SetError<T>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<T: PartialEq> PartialEq<SetError<T>> for SetError<T>
impl<T: PartialEq> PartialEq<SetError<T>> for SetError<T>
impl<T> StructuralPartialEq for SetError<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for SetError<T>where T: RefUnwindSafe,
impl<T> Send for SetError<T>where T: Send,
impl<T> Sync for SetError<T>where T: Sync,
impl<T> Unpin for SetError<T>where T: Unpin,
impl<T> UnwindSafe for SetError<T>where T: UnwindSafe,
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