Struct downcast::DowncastError
source · 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)>
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> 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