pub struct ExceptionHandlerChain { /* private fields */ }Expand description
A chain of exception handlers
Implementations§
Source§impl ExceptionHandlerChain
impl ExceptionHandlerChain
Sourcepub fn add_handler<H: ExceptionHandler + 'static>(self, handler: H) -> Self
pub fn add_handler<H: ExceptionHandler + 'static>(self, handler: H) -> Self
Add a handler to the chain
Sourcepub fn handle(&self, exception: &TaskException) -> ExceptionAction
pub fn handle(&self, exception: &TaskException) -> ExceptionAction
Handle an exception through the chain
Returns the first non-Default action, or Default if all handlers return Default
Sourcepub fn transform(&self, exception: TaskException) -> TaskException
pub fn transform(&self, exception: TaskException) -> TaskException
Transform an exception through all handlers
Trait Implementations§
Source§impl Default for ExceptionHandlerChain
impl Default for ExceptionHandlerChain
Source§fn default() -> ExceptionHandlerChain
fn default() -> ExceptionHandlerChain
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExceptionHandlerChain
impl !RefUnwindSafe for ExceptionHandlerChain
impl Send for ExceptionHandlerChain
impl Sync for ExceptionHandlerChain
impl Unpin for ExceptionHandlerChain
impl !UnwindSafe for ExceptionHandlerChain
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