Trait ErrorHandler

Source
pub trait ErrorHandler<T, E> {
    // Required method
    fn handle_err(self, loc: Location) -> Result<T, Error>;
}
Expand description

Trait for logging and handling errors in a unified way

Required Methods§

Source

fn handle_err(self, loc: Location) -> Result<T, Error>

Handle the error and log its location

Implementations on Foreign Types§

Source§

impl<T, E: Display> ErrorHandler<T, E> for Result<T, E>

Source§

fn handle_err(self, location: Location) -> Result<T, Error>

Implementors§