Trait ResultExt

Source
pub trait ResultExt<T, A, S> {
    // Required methods
    fn map_actor_err<F, U>(self, f: F) -> Result<T, ActorSystemError<U, S>>
       where F: FnOnce(A) -> U;
    fn map_system_err<F, U>(self, f: F) -> Result<T, ActorSystemError<A, U>>
       where F: FnOnce(S) -> U;
    fn map_err_into<UA, US>(self) -> Result<T, ActorSystemError<UA, US>>
       where UA: From<A>,
             US: From<S>;
}
Expand description

Extension for Result around actor-system error.

Required Methods§

Source

fn map_actor_err<F, U>(self, f: F) -> Result<T, ActorSystemError<U, S>>
where F: FnOnce(A) -> U,

Map actor error.

Source

fn map_system_err<F, U>(self, f: F) -> Result<T, ActorSystemError<A, U>>
where F: FnOnce(S) -> U,

Map system error.

Source

fn map_err_into<UA, US>(self) -> Result<T, ActorSystemError<UA, US>>
where UA: From<A>, US: From<S>,

Map actor or system error.

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.

Implementations on Foreign Types§

Source§

impl<T, A, S> ResultExt<T, A, S> for Result<T, ActorSystemError<A, S>>

Source§

fn map_actor_err<F, U>(self, f: F) -> Result<T, ActorSystemError<U, S>>
where F: FnOnce(A) -> U,

Source§

fn map_system_err<F, U>(self, f: F) -> Result<T, ActorSystemError<A, U>>
where F: FnOnce(S) -> U,

Source§

fn map_err_into<UA, US>(self) -> Result<T, ActorSystemError<UA, US>>
where UA: From<A>, US: From<S>,

Implementors§