[−][src]Struct failure::Compat
A compatibility wrapper around an error type from this crate.
Compat
implements std::error::Error
, allowing the types from this
crate to be passed to interfaces that expect a type of that trait.
Methods
impl<E> Compat<E>
[src]
impl<E> Compat<E>
pub fn into_inner(self) -> E
[src]
pub fn into_inner(self) -> E
Unwraps this into the inner error.
pub fn get_ref(&self) -> &E
[src]
pub fn get_ref(&self) -> &E
Gets a reference to the inner error.
Trait Implementations
impl<E: PartialEq> PartialEq<Compat<E>> for Compat<E>
[src]
impl<E: PartialEq> PartialEq<Compat<E>> for Compat<E>
fn eq(&self, other: &Compat<E>) -> bool
[src]
fn eq(&self, other: &Compat<E>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Compat<E>) -> bool
[src]
fn ne(&self, other: &Compat<E>) -> bool
This method tests for !=
.
impl<E: Default> Default for Compat<E>
[src]
impl<E: Default> Default for Compat<E>
impl<E: Clone> Clone for Compat<E>
[src]
impl<E: Clone> Clone for Compat<E>
fn clone(&self) -> Compat<E>
[src]
fn clone(&self) -> Compat<E>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<E: Copy> Copy for Compat<E>
[src]
impl<E: Copy> Copy for Compat<E>
impl<E: Eq> Eq for Compat<E>
[src]
impl<E: Eq> Eq for Compat<E>
impl<E: Display> Display for Compat<E>
[src]
impl<E: Display> Display for Compat<E>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<E: Debug> Debug for Compat<E>
[src]
impl<E: Debug> Debug for Compat<E>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<E: Hash> Hash for Compat<E>
[src]
impl<E: Hash> Hash for Compat<E>
fn hash<__HE: Hasher>(&self, state: &mut __HE)
[src]
fn hash<__HE: Hasher>(&self, state: &mut __HE)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<E: Display + Debug> Error for Compat<E>
[src]
impl<E: Display + Debug> Error for Compat<E>
fn description(&self) -> &'static str
[src]
fn description(&self) -> &'static str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
: replaced by Error::source, which can support downcasting
The lower-level cause of this error, if any. Read more
fn source(&self) -> Option<&(Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(Error + 'static)>
The lower-level source of this error, if any. Read more
Auto Trait Implementations
Blanket Implementations
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
[src]
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
fn cause(&self) -> Option<&Fail>
[src]
fn cause(&self) -> Option<&Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
Self: Sized,
[src]
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
Self: Sized,
Provides context for this failure. Read more
fn compat(self) -> Compat<Self> where
Self: Sized,
[src]
fn compat(self) -> Compat<Self> where
Self: Sized,
Wraps this failure in a compatibility wrapper that implements std::error::Error
. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more