Downcast

Enum Downcast 

Source
pub enum Downcast<'e, A: 'static, E: Error + 'static, K: UniKind> {
    DisplayRef(&'e A),
    ErrorRef(&'e E),
    UniError(UniError<K>),
}
Expand description

A reference to a downcasted error.

Variants§

§

DisplayRef(&'e A)

A reference to a downcasted error for all non-std::error::Error types

§

ErrorRef(&'e E)

A reference to a downcasted error that implements std::error::Error.

§

UniError(UniError<K>)

A UniError<K>. Not actually downcasted, but reconstructed.

Auto Trait Implementations§

§

impl<'e, A, E, K> Freeze for Downcast<'e, A, E, K>

§

impl<'e, A, E, K> !RefUnwindSafe for Downcast<'e, A, E, K>

§

impl<'e, A, E, K> Send for Downcast<'e, A, E, K>
where A: Sync, E: Sync,

§

impl<'e, A, E, K> Sync for Downcast<'e, A, E, K>
where A: Sync, E: Sync,

§

impl<'e, A, E, K> Unpin for Downcast<'e, A, E, K>

§

impl<'e, A, E, K> !UnwindSafe for Downcast<'e, A, E, K>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.