pub fn fold<T, V, E, Iter: Iterator<Result<T, E>>>(iterator: Iter, init: V, f: &fn(V, T) -> V) -> Result<V, E>
Perform a fold operation over the result values from an iterator.
If an Err
is encountered, it is immediately returned.
Otherwise, the folded value is returned.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).