pub struct LoxError(/* private fields */);Expand description
A type-erased error carrying an arbitrary failure across an abstraction boundary.
Unlike a transparent wrapper, LoxError exposes the erased error as its
source, so the wrapped error remains
reachable when walking an error chain with find_source.
Implementations§
Source§impl LoxError
impl LoxError
Sourcepub fn new(error: impl Into<BoxedError>) -> Self
pub fn new(error: impl Into<BoxedError>) -> Self
Wraps an arbitrary error.
Sourcepub fn into_inner(self) -> BoxedError
pub fn into_inner(self) -> BoxedError
Returns the wrapped error.
Sourcepub fn downcast_ref<E: Error + 'static>(&self) -> Option<&E>
pub fn downcast_ref<E: Error + 'static>(&self) -> Option<&E>
Searches the wrapped error and its source chain for an error of type E.
Trait Implementations§
Source§impl Error for LoxError
impl Error for LoxError
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()
Source§impl From<!> for LoxError
impl From<!> for LoxError
Source§fn from(x: Infallible) -> Self
fn from(x: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<Box<dyn Error + Sync + Send>> for LoxError
impl From<Box<dyn Error + Sync + Send>> for LoxError
Source§fn from(e: BoxedError) -> Self
fn from(e: BoxedError) -> Self
Converts to this type from the input type.
Source§impl From<LoxError> for MinimizerError
impl From<LoxError> for MinimizerError
Auto Trait Implementations§
impl !RefUnwindSafe for LoxError
impl !UnwindSafe for LoxError
impl Freeze for LoxError
impl Send for LoxError
impl Sync for LoxError
impl Unpin for LoxError
impl UnsafeUnpin for LoxError
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