[−][src]Trait casper_node::effect::EffectOptionExt
Effect extension for futures, used to convert futures returning an Option into two different
effects.
Associated Types
type Value
The type the future will return if Some.
Required methods
fn option<U, F, G>(self, f_some: F, f_none: G) -> Effects<U> where
F: FnOnce(Self::Value) -> U + 'static + Send,
G: FnOnce() -> U + 'static + Send,
U: 'static,
F: FnOnce(Self::Value) -> U + 'static + Send,
G: FnOnce() -> U + 'static + Send,
U: 'static,
Finalizes a future returning an Option into two different effects.
The function f_some is used to translate the returned value from an effect into an event,
while the function f_none does the same for a returned None.
Implementors
impl<T, V> EffectOptionExt for T where
T: Future<Output = Option<V>> + Send + 'static + Sized,
T: ?Sized, [src]
T: Future<Output = Option<V>> + Send + 'static + Sized,
T: ?Sized,