pub type UniResult<T, K> = Result<T, UniError<K>>;Expand description
A result type that specifies a customkind.
Aliased Type§
pub enum UniResult<T, K> {
Ok(T),
Err(UniError<K>),
}Variants§
Trait Implementations§
Source§impl<K: UniKind, K2: UniKind, T> ResultContext<K2, T, K> for UniResult<T, K>
impl<K: UniKind, K2: UniKind, T> ResultContext<K2, T, K> for UniResult<T, K>
Source§fn kind(self, kind: K2) -> UniResult<T, K2>
fn kind(self, kind: K2) -> UniResult<T, K2>
Wraps the existing result error with the provided kind.
Source§fn context(self, context: impl Into<Cow<'static, str>>) -> UniResult<T, K2>where
K2: Default,
fn context(self, context: impl Into<Cow<'static, str>>) -> UniResult<T, K2>where
K2: Default,
Wraps the existing result error with the provided context.
Source§fn kind_context(
self,
kind: K2,
context: impl Into<Cow<'static, str>>,
) -> UniResult<T, K2>
fn kind_context( self, kind: K2, context: impl Into<Cow<'static, str>>, ) -> UniResult<T, K2>
Wraps the existing result error with the provided kind and context.
Source§fn wrap(self) -> UniResult<T, K2>where
K2: Default,
fn wrap(self) -> UniResult<T, K2>where
K2: Default,
Wraps the existing result error with no additional context.
Source§fn kind_fn<F>(self, kind: F) -> UniResult<T, K>
fn kind_fn<F>(self, kind: F) -> UniResult<T, K>
Wraps the existing result error with the provided kind.
Source§fn context_fn<F, S>(self, context: F) -> UniResult<T, K>
fn context_fn<F, S>(self, context: F) -> UniResult<T, K>
Wraps the existing result error with the provided context.