Trait casper_node::effect::EffectResultExt [−][src]
pub trait EffectResultExt {
type Value;
type Error;
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;
}Expand description
Effect extension for futures, used to convert futures returning a Result into two different
effects.
Associated Types
Required methods
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.