Trait azure_core::error::ResultExt
source · [−]pub trait ResultExt<T>: Sealed {
fn map_kind(self, kind: ErrorKind) -> Result<T>
where
Self: Sized;
fn context<C>(self, kind: ErrorKind, message: C) -> Result<T>
where
Self: Sized,
C: Into<Cow<'static, str>>;
fn with_context<F, C>(self, kind: ErrorKind, f: F) -> Result<T>
where
Self: Sized,
F: FnOnce() -> C,
C: Into<Cow<'static, str>>;
}
Expand description
An extension to the Result
type that easy allows creating Error
values from existing errors
This trait cannot be implemented on custom types and is meant for usage with Result
Required Methods
Creates a new error with the specified kind
Creates a new error with the specified kind and message