Struct flex_error::DetailOnly[][src]

pub struct DetailOnly<Detail>(_);
Expand description

An ErrorSource that only provides error details but do not provide any trace. This can typically comes from primitive error types that do not implement Error. The Detail type is the error and the returned trace is None.

It is also possible to omit specifying the error as an error source, and instead place it as a field in the error variant. However specifying it as a DetailOnly source may give stronger hint to the reader that the particular error variant is caused by other underlying errors.

Trait Implementations

impl<Detail, Trace> ErrorSource<Trace> for DetailOnly<Detail>[src]

type Detail = Detail

The type of the error detail that can be extracted from the error source

type Source = Detail

The type of the error source.

fn error_details(source: Self::Source) -> (Self::Detail, Option<Trace>)[src]

Extracts the error details out from the error source, together with an optional error trace. Read more

Auto Trait Implementations

impl<Detail> RefUnwindSafe for DetailOnly<Detail> where
    Detail: RefUnwindSafe

impl<Detail> Send for DetailOnly<Detail> where
    Detail: Send

impl<Detail> Sync for DetailOnly<Detail> where
    Detail: Sync

impl<Detail> Unpin for DetailOnly<Detail> where
    Detail: Unpin

impl<Detail> UnwindSafe for DetailOnly<Detail> where
    Detail: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.