pub struct Trace<E: Error> { /* private fields */ }
Expand description
Trace error that encapsulates a backtrace alongside an error value.
Trace itself does not implement Error
, so they cannot be nested.
Implementations§
Source§impl<E: Error> Trace<E>
impl<E: Error> Trace<E>
Sourcepub fn new(error: E, backtrace: Box<SourceBacktrace>) -> Trace<E>
pub fn new(error: E, backtrace: Box<SourceBacktrace>) -> Trace<E>
Creates a new Trace
from the given error and backtrace
Sourcepub fn into_error(self) -> E
pub fn into_error(self) -> E
Consume self and return the inner error value
Sourcepub fn backtrace(&self) -> &SourceBacktrace
pub fn backtrace(&self) -> &SourceBacktrace
Get a reference to the inner backtrace
Trait Implementations§
impl<E> Send for Trace<E>
Auto Trait Implementations§
impl<E> Freeze for Trace<E>where
E: Freeze,
impl<E> RefUnwindSafe for Trace<E>where
E: RefUnwindSafe,
impl<E> Sync for Trace<E>where
E: Sync,
impl<E> Unpin for Trace<E>where
E: Unpin,
impl<E> UnwindSafe for Trace<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