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
sourceimpl<E> Compat<E>
impl<E> Compat<E>
sourcepub fn into_inner(self) -> E
pub fn into_inner(self) -> E
Unwraps this into the inner error.
Trait Implementations
sourceimpl<E: Display + Debug> Error for Compat<E>
impl<E: Display + Debug> Error for Compat<E>
sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<E> Fail for E where
E: 'static + Error + Send + Sync,
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
sourcefn 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
sourcefn 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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more