pub enum SetError<T> {
AlreadyInitializedError(T),
InitializingError(T),
}展开描述
可从 OnceCell::set 返回的错误。
变体§
实现§
源代码§impl<T> SetError<T>
impl<T> SetError<T>
源代码pub fn is_already_init_err(&self) -> bool
pub fn is_already_init_err(&self) -> bool
SetError 是否为 SetError::AlreadyInitializedError。
源代码pub fn is_initializing_err(&self) -> bool
pub fn is_initializing_err(&self) -> bool
SetError 是否为 SetError::InitializingError
trait 实现§
源代码§impl<T: Debug> Error for SetError<T>
impl<T: Debug> Error for SetError<T>
impl<T: Eq> Eq for SetError<T>
impl<T> StructuralPartialEq for SetError<T>
自动 trait 实现§
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 实现§
源代码§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
源代码§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. 更多信息