pub struct HandlerError {
pub message: String,
}Expand description
A handler-signalled failure (author Err(...) or a caught panic) — the
analog of an arbitrary thrown RuntimeException/AssertionError.
Fields§
§message: StringImplementations§
Source§impl HandlerError
impl HandlerError
pub fn new(message: impl Into<String>) -> HandlerError
Sourcepub fn from_panic(payload: Box<dyn Any + Send>) -> HandlerError
pub fn from_panic(payload: Box<dyn Any + Send>) -> HandlerError
Extracts a message from a catch_unwind panic payload (&str/String,
else a generic fallback).
Trait Implementations§
Source§impl Clone for HandlerError
impl Clone for HandlerError
Source§fn clone(&self) -> HandlerError
fn clone(&self) -> HandlerError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandlerError
impl Debug for HandlerError
impl Eq for HandlerError
Source§impl PartialEq for HandlerError
impl PartialEq for HandlerError
impl StructuralPartialEq for HandlerError
Auto Trait Implementations§
impl Freeze for HandlerError
impl RefUnwindSafe for HandlerError
impl Send for HandlerError
impl Sync for HandlerError
impl Unpin for HandlerError
impl UnsafeUnpin for HandlerError
impl UnwindSafe for HandlerError
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> 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