Skip to main content

ErrorWrapAs

Trait ErrorWrapAs 

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

Required Methods§

Source

fn wrap_as( 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, R1, R2> ErrorWrapAs<T, R2> for Result<T, StructError<R1>>
where R1: DomainReason + ErrorCode + Display + Debug + Send + Sync + 'static, R2: DomainReason,

Source§

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

Implementors§