pub struct BoxedError<ErrorKindT: Fail> { /* private fields */ }
Expand description
An error type which stores the backtrace, cause pointer and error kind behind a Box
.
The size of this object is always one pointer. It’s therefore smaller than UnboxedError
, but
requires an allocation when created.
Implementations§
Source§impl<ErrorKindT: Fail> BoxedError<ErrorKindT>
impl<ErrorKindT: Fail> BoxedError<ErrorKindT>
pub fn kind(&self) -> &ErrorKindT
Trait Implementations§
Source§impl<ErrorKindT: Fail> Display for BoxedError<ErrorKindT>
impl<ErrorKindT: Fail> Display for BoxedError<ErrorKindT>
Source§impl<ErrorKindT: Fail> Fail for BoxedError<ErrorKindT>
impl<ErrorKindT: Fail> Fail for BoxedError<ErrorKindT>
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 moreAuto Trait Implementations§
impl<ErrorKindT> Freeze for BoxedError<ErrorKindT>
impl<ErrorKindT> !RefUnwindSafe for BoxedError<ErrorKindT>
impl<ErrorKindT> Send for BoxedError<ErrorKindT>
impl<ErrorKindT> Sync for BoxedError<ErrorKindT>
impl<ErrorKindT> Unpin for BoxedError<ErrorKindT>
impl<ErrorKindT> !UnwindSafe for BoxedError<ErrorKindT>
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