Enum SetError
pub enum SetError<T> {
AlreadyInitializedError(T),
InitializingError(T),
}
Available on crate feature
sync only.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
impl<T> SetError<T>
pub fn is_already_init_err(&self) -> bool
Whether SetError is SetError::AlreadyInitializedError.
pub fn is_initializing_err(&self) -> bool
Whether SetError is SetError::InitializingError
Trait Implementations
impl<T: Eq> Eq for SetError<T>
impl<T: Debug> Error for SetError<T>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl<T: PartialEq> StructuralPartialEq for SetError<T>
Auto Trait Implementations
impl<T> Freeze for SetError<T>where T: Freeze,
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> UnsafeUnpin for SetError<T>where T: UnsafeUnpin,
impl<T> UnwindSafe for SetError<T>where T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Instrument for T
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> ToString for T
impl<T> WithSubscriber for T
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/sync/enum.SetError.html