tinymist_std::error

Trait IgnoreLogging

Source
pub trait IgnoreLogging<T>: Sized {
    // Required methods
    fn log_error(self, msg: &str) -> Option<T>;
    fn log_error_with(self, f: impl FnOnce() -> String) -> Option<T>;
}
Expand description

A trait to add context to a result.

Required Methods§

Source

fn log_error(self, msg: &str) -> Option<T>

Log an error message and return None.

Source

fn log_error_with(self, f: impl FnOnce() -> String) -> Option<T>

Log an error message and return None.

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.

Implementors§

Source§

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