pub trait GResultExt<T, E>: Sealed {
// Required methods
fn gerr<C: Config, D>(
self,
id: C::Id,
message: impl Into<Cow<'static, str>>,
) -> Result<T, C, D>;
fn gerr_auto<C: Config, D>(
self,
message: impl Into<Cow<'static, str>>,
) -> Result<T, C, D>;
fn wrap_gerr<C: Config, D>(self, gerr: GErr<C, D>) -> Result<T, C, D>;
fn boxed(self) -> Result<T, Box<E>>;
}Expand description
Result extension where E is GErr or any error implementing Into<GErrSource>.
Use this extension if you pass GErr or Into<GErrSource> from Result’s E and want to keep the detail attributes.
Required Methods§
Sourcefn gerr<C: Config, D>(
self,
id: C::Id,
message: impl Into<Cow<'static, str>>,
) -> Result<T, C, D>
fn gerr<C: Config, D>( self, id: C::Id, message: impl Into<Cow<'static, str>>, ) -> Result<T, C, D>
Wrap E as GErr’s source, where E is Into<GErrSource>, and id is manually-set.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".