pub enum DowncastFailure {
Mismatch,
Shared,
}Expand description
Why a downcast could not hand out the stored error.
Variants§
Mismatch
The stored error is not an instance of the requested type.
A clone of the error is still alive, so its contents can neither be moved out nor borrowed mutably.
Trait Implementations§
Source§impl Clone for DowncastFailure
impl Clone for DowncastFailure
impl Copy for DowncastFailure
Source§impl Debug for DowncastFailure
impl Debug for DowncastFailure
Source§impl Display for DowncastFailure
impl Display for DowncastFailure
impl Eq for DowncastFailure
Source§impl Error for DowncastFailure
impl Error for DowncastFailure
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()
Source§impl PartialEq for DowncastFailure
impl PartialEq for DowncastFailure
impl StructuralPartialEq for DowncastFailure
Auto Trait Implementations§
impl Freeze for DowncastFailure
impl RefUnwindSafe for DowncastFailure
impl Send for DowncastFailure
impl Sync for DowncastFailure
impl Unpin for DowncastFailure
impl UnsafeUnpin for DowncastFailure
impl UnwindSafe for DowncastFailure
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