Skip to main content

ToStructError

Trait ToStructError 

Source
pub trait ToStructError<R>
where R: DomainReason,
{ // Required methods fn to_err(self) -> StructError<R>; fn err_result<T>(self) -> Result<T, StructError<R>>; }
Expand description

Convenience to wrap any DomainReason value into a StructError.

Provides both direct to_err() and err_result::<T>() via blanket impl for all R: DomainReason.

Required Methods§

Source

fn to_err(self) -> StructError<R>

Source

fn err_result<T>(self) -> 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.

Implementors§

Source§

impl<R> ToStructError<R> for R
where R: DomainReason,