pub struct OptionalError(pub Option<Box<dyn Error + Send + Sync + 'static>>);
Expand description
Wrapper for Option<Box<dyn Error>>
to make it compatible with backtrace
This struct provides a way to handle optional error sources in a way that’s compatible with the backtrace error handling framework. It wraps an optional boxed error trait object and provides methods to work with it.
Tuple Fields§
§0: Option<Box<dyn Error + Send + Sync + 'static>>
Implementations§
Trait Implementations§
Source§impl Clone for OptionalError
impl Clone for OptionalError
Source§impl Debug for OptionalError
impl Debug for OptionalError
Source§impl Display for OptionalError
impl Display for OptionalError
Source§impl Error for OptionalError
impl Error for OptionalError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for OptionalError
impl !RefUnwindSafe for OptionalError
impl Send for OptionalError
impl Sync for OptionalError
impl Unpin for OptionalError
impl !UnwindSafe for OptionalError
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