Skip to main content

WithErrorInfo

Trait WithErrorInfo 

Source
pub trait WithErrorInfo: Sized {
    // Required methods
    fn push_hint<S: Into<String>>(self, hint: S) -> Self;
    fn with_hints<S: Into<String>, I: IntoIterator<Item = S>>(
        self,
        hints: I,
    ) -> Self;
    fn with_span(self, span: Option<Span>) -> Self;
    fn with_span_fallback(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: Into<String>>(self, hint: S) -> Self

Source

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

Source

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

Source

fn with_span_fallback(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".

Implementations on Foreign Types§

Source§

impl<T, E: WithErrorInfo> WithErrorInfo for Result<T, E>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§