Trait WithErrorInfo

Source
pub trait WithErrorInfo: Sized {
    // Required methods
    fn push_hint<S>(self, hint: S) -> Self
       where S: Into<String>;
    fn with_hints<S, I>(self, hints: I) -> Self
       where S: Into<String>,
             I: IntoIterator<Item = S>;
    fn with_span(self, span: Option<Span>) -> Self;
    fn with_code(self, code: &'static str) -> Self;
    fn with_source(self, source: ErrorSource) -> Self;
}

Required Methods§

Source

fn push_hint<S>(self, hint: S) -> Self
where S: Into<String>,

Source

fn with_hints<S, I>(self, hints: I) -> Self
where S: Into<String>, I: IntoIterator<Item = S>,

Source

fn with_span(self, span: Option<Span>) -> Self

Source

fn with_code(self, code: &'static str) -> Self

Source

fn with_source(self, source: ErrorSource) -> Self

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> WithErrorInfo for Result<T, E>
where E: WithErrorInfo,

Source§

fn push_hint<S>(self, hint: S) -> Result<T, E>
where S: Into<String>,

Source§

fn with_hints<S, I>(self, hints: I) -> Result<T, E>
where S: Into<String>, I: IntoIterator<Item = S>,

Source§

fn with_span(self, span: Option<Span>) -> Result<T, E>

Source§

fn with_code(self, code: &'static str) -> Result<T, E>

Source§

fn with_source(self, source: ErrorSource) -> Result<T, E>

Implementors§