Skip to main content

IntoError

Trait IntoError 

Source
pub trait IntoError<E> {
    type Source;

    // Required method
    fn into_error(self, source: Self::Source) -> E;
}
Expand description

Combines an underlying error with additional information about the error.

It is expected that most users of SNAFU will not directly interact with this trait.

Constructing E does not require it to implement Error or ErrorCompat. Callers that report the result must add the diagnostic bounds they use. A generated selector may still require source capabilities for source-aware GenerateImplicitData.

Required Associated Types§

Source

type Source

The underlying error

Required Methods§

Source

fn into_error(self, source: Self::Source) -> E

Combine the information to produce the error

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl IntoError<Error> for IntermediateSnafu

Available on crate feature guide only.
Source§

impl IntoError<Error> for SnafuErrorAsSourceSnafu

Available on crate feature guide only.
Source§

impl IntoError<Error> for SourceErrorDoesNotHaveBacktraceSnafu

Available on crate feature guide only.
Source§

impl IntoError<Error> for UsedInTightLoopSnafu

Available on crate feature guide only.
Source§

impl IntoError<Error> for UsualCaseSnafu

Available on crate feature guide only.
Source§

impl<__T0> IntoError<Error> for LeafSnafu<__T0>
where __T0: Into<i32>,

Available on crate feature guide only.