pub struct Compat<E> { /* private fields */ }
Expand description
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.
Implementations§
Trait Implementations§
source§impl<E: Display + Debug> Error for Compat<E>
impl<E: Display + Debug> Error for Compat<E>
source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
source§impl<E: PartialEq> PartialEq for Compat<E>
impl<E: PartialEq> PartialEq for Compat<E>
impl<E: Copy> Copy for Compat<E>
impl<E: Eq> Eq for Compat<E>
impl<E> StructuralEq for Compat<E>
impl<E> StructuralPartialEq for Compat<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for Compat<E>where E: RefUnwindSafe,
impl<E> Send for Compat<E>where E: Send,
impl<E> Sync for Compat<E>where E: Sync,
impl<E> Unpin for Compat<E>where E: Unpin,
impl<E> UnwindSafe for Compat<E>where E: 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
source§impl<E> Fail for Ewhere
E: Error + Send + Sync + 'static,
impl<E> Fail for Ewhere E: Error + Send + Sync + 'static,
source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read more