Skip to main content

SourceRawErr

Trait SourceRawErr 

Source
pub trait SourceRawErr<T, R: DomainReason>: Sized {
    // Required method
    fn source_raw_err(
        self,
        reason: R,
        detail: impl Into<String>,
    ) -> Result<T, StructError<R>>;
}
Expand description

Like SourceErr::source_err but accepts any StdError.

Internally wraps the error with any_err so the sealed UnstructuredSource bound is satisfied without weakening the sealing contract.

Required Methods§

Source

fn source_raw_err( self, reason: R, detail: impl Into<String>, ) -> Result<T, StructError<R>>

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, R> SourceRawErr<T, R> for Result<T, E>
where E: StdError + Send + Sync + 'static, R: DomainReason,

Source§

fn source_raw_err( self, reason: R, detail: impl Into<String>, ) -> Result<T, StructError<R>>

Implementors§