Function eventuals::map

source · []
pub fn map<E, I, O, F, Fut>(source: E, f: F) -> Eventual<O> where
    E: IntoReader<Output = I>,
    F: 'static + Send + FnMut(I) -> Fut,
    I: Value,
    O: Value,
    Fut: Send + Future<Output = O>, 
Expand description

Applies an operation to each observed snapshot from the source. For example: map([1, 2, 3, 4, 5], |v| v+1) may produce something like [2, 6] or [3, 4, 6]. In this case, 6 is the only value guaranteed to be observed eventually.