[−][src]Trait casper_node::effect::EffectResultExt
Effect extension for futures, used to convert futures returning a Result into two different
effects.
Associated Types
type Value[src]
The type the future will return if Ok.
type Error[src]
The type the future will return if Err.
Required methods
pub fn result<U, F, G>(self, f_ok: F, f_err: G) -> Effects<U> where
F: FnOnce(Self::Value) -> U + 'static + Send,
G: FnOnce(Self::Error) -> U + 'static + Send,
U: 'static, [src]
F: FnOnce(Self::Value) -> U + 'static + Send,
G: FnOnce(Self::Error) -> U + 'static + Send,
U: 'static,
Finalizes a future returning a Result into two different effects.
The function f_ok is used to translate the returned value from an effect into an event,
while the function f_err does the same for a potential error.
Implementors
impl<T, V, E> EffectResultExt for T where
T: Future<Output = Result<V, E>> + Send + 'static + Sized,
T: ?Sized, [src]
T: Future<Output = Result<V, E>> + Send + 'static + Sized,
T: ?Sized,