pub enum DowncastError<T: ?Sized> {
Borrowed(ThinCell<T>),
Type(ThinCell<T>),
}Expand description
Error returned by ThinCell::downcast when downcasting fails.
Variants§
Borrowed(ThinCell<T>)
The ThinCell is currently borrowed.
Type(ThinCell<T>)
The inner value is not of the target type.
Implementations§
Source§impl<T: ?Sized> DowncastError<T>
impl<T: ?Sized> DowncastError<T>
Sourcepub fn into_inner(self) -> ThinCell<T>
pub fn into_inner(self) -> ThinCell<T>
Consumes the error and returns the original ThinCell<T>.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DowncastError<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for DowncastError<T>
impl<T> Send for DowncastError<T>
impl<T> Sync for DowncastError<T>
impl<T> Unpin for DowncastError<T>where
T: ?Sized,
impl<T> UnsafeUnpin for DowncastError<T>where
T: ?Sized,
impl<T> UnwindSafe for DowncastError<T>where
T: UnwindSafe + ?Sized,
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