Skip to main content

ErrorHandler

Trait ErrorHandler 

Source
pub trait ErrorHandler:
    Send
    + Sync
    + UnwindSafe
    + RefUnwindSafe
    + 'static {
    // Required method
    fn run(&self, _: Error) -> ErrorReaction;
}

Required Methods§

Source

fn run(&self, _: Error) -> ErrorReaction

Handles an error.

The handler is given ownership of the error so that the handler can easily store the error somewhere if desired.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> ErrorHandler for T
where T: Fn(Error) -> ErrorReaction + Send + Sync + UnwindSafe + RefUnwindSafe + 'static,