Skip to main content

StatsErrorExt

Trait StatsErrorExt 

Source
pub trait StatsErrorExt {
    // Required methods
    fn context<S: Into<String>>(self, context: S) -> Self;
    fn suggestion<S: Into<String>>(self, suggestion: S) -> Self;
}
Expand description

Helper trait for adding context and recovery suggestions to errors

Required Methods§

Source

fn context<S: Into<String>>(self, context: S) -> Self

Add context information to the error

Source

fn suggestion<S: Into<String>>(self, suggestion: S) -> Self

Add a recovery suggestion to the error

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§