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>
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
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> Any for T
impl<T> Any for T
Source§fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
TODO: once 1.33.0 is the minimum supported compiler version, remove
Any::type_id_compat and use StdAny::type_id instead.
https://github.com/rust-lang/rust/issues/27745
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