Trait LogError

Source
pub trait LogError {
    // Required method
    fn log_error(self) -> Self;
}
Expand description

Trait exposing the interface

Required Methods§

Source

fn log_error(self) -> Self

This function should check if self is an error and if so logs the error then returns the initial value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T, E: Error> LogError for Result<T, E>

Source§

fn log_error(self) -> Self

Log the error and returns itself

Implementors§