pub trait ResultExt<T>: Sealed {
// Required methods
fn with_kind(self, kind: ErrorKind) -> Result<T, Error>
where Self: Sized;
fn with_context<C>(self, kind: ErrorKind, message: C) -> Result<T, Error>
where Self: Sized,
C: Into<Cow<'static, str>>;
fn with_context_fn<F, C>(self, kind: ErrorKind, f: F) -> Result<T, Error>
where Self: Sized,
F: FnOnce() -> C,
C: Into<Cow<'static, str>>;
}Expand description
Required Methods§
Sourcefn with_kind(self, kind: ErrorKind) -> Result<T, Error>where
Self: Sized,
fn with_kind(self, kind: ErrorKind) -> Result<T, Error>where
Self: Sized,
Creates a new error with the specified ErrorKind.