pub struct DowncastError<O> { /* private fields */ }
Implementations§
Source§impl<O> DowncastError<O>
impl<O> DowncastError<O>
pub fn new(mismatch: TypeMismatch, object: O) -> Self
pub fn type_mismatch(&self) -> TypeMismatch
pub fn into_object(self) -> O
Trait Implementations§
Source§impl<O> Debug for DowncastError<O>
impl<O> Debug for DowncastError<O>
Source§impl<O> Display for DowncastError<O>
impl<O> Display for DowncastError<O>
Source§impl<O> Error for DowncastError<O>
impl<O> Error for DowncastError<O>
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()
Auto Trait Implementations§
impl<O> Freeze for DowncastError<O>where
O: Freeze,
impl<O> RefUnwindSafe for DowncastError<O>where
O: RefUnwindSafe,
impl<O> Send for DowncastError<O>where
O: Send,
impl<O> Sync for DowncastError<O>where
O: Sync,
impl<O> Unpin for DowncastError<O>where
O: Unpin,
impl<O> UnwindSafe for DowncastError<O>where
O: 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