pub struct Error(/* private fields */);Expand description
A cheaply clonable, type-erased error.
Every std::error::Error converts into it, so plugin code can use ? on
any fallible call. It deliberately does not implement std::error::Error
itself (that would conflict with the blanket From); use Error::as_std
where a standard error is required.
Implementations§
Source§impl Error
impl Error
pub fn new<E>(error: E) -> Error
pub fn msg(message: impl Display) -> Error
pub fn downcast_ref<E>(&self) -> Option<&E>where
E: Error + 'static,
pub fn is<E>(&self) -> boolwhere
E: Error + 'static,
Sourcepub fn is_interrupted(&self) -> bool
pub fn is_interrupted(&self) -> bool
true for the non-failure outcome of an iteration boundary.
pub fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more