Trait casper_node::effect::EffectOptionExt [−][src]
pub trait EffectOptionExt {
type Value;
fn map_or_else<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;
fn map_some<U, F>(self, f: F) -> Effects<U>
where
F: FnOnce(Self::Value) -> U + 'static + Send,
U: 'static;
}Expand description
Effect extension for futures, used to convert futures returning an Option into two different
effects.
Associated Types
Required methods
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.
Finalizes a future returning an Option into two different effects.
The function f is used to translate the returned value from an effect into an event,
In the case of None, empty vector of effects is returned.