pub trait LogErr<T, E: Display> {
// Required method
fn err_log(self, level: Level) -> Self;
// Provided method
fn log_err(self) -> Self
where Self: Sized { ... }
}Expand description
Logs display-formatted errors without changing their result.
Successful values pass through without producing a record. Errors remain available to the caller after being logged.
Required Methods§
Provided Methods§
Sourcefn log_err(self) -> Selfwhere
Self: Sized,
fn log_err(self) -> Selfwhere
Self: Sized,
Logs an error at the error tracing level.
LogErr::err_log supplies this convenience form with
Level::ERROR. The original result is returned after inspection.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".