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§
Required Methods§
Sourcefn into_error(self, source: Self::Source) -> E
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.
impl IntoError<Error> for IntermediateSnafu
Available on crate feature
guide only.Source§impl IntoError<Error> for SnafuErrorAsSourceSnafu
Available on crate feature guide only.
impl IntoError<Error> for SnafuErrorAsSourceSnafu
Available on crate feature
guide only.type Source = ConfigFileError
Source§impl IntoError<Error> for SourceErrorDoesNotHaveBacktraceSnafu
Available on crate feature guide only.
impl IntoError<Error> for SourceErrorDoesNotHaveBacktraceSnafu
Available on crate feature
guide only.Source§impl IntoError<Error> for UsedInTightLoopSnafu
Available on crate feature guide only.
impl IntoError<Error> for UsedInTightLoopSnafu
Available on crate feature
guide only.Source§impl IntoError<Error> for UsualCaseSnafu
Available on crate feature guide only.
impl IntoError<Error> for UsualCaseSnafu
Available on crate feature
guide only.