pub trait FilterFoldStream: Stream + Sized {
// Provided method
fn filter_fold<F, A, Fut, U>(
self,
acc: A,
f: F,
) -> FilterFold<Self, F, A, Fut>
where Self::Error: From<Fut::Error>,
F: FnMut(A, Self::Item) -> Fut,
Fut: IntoFuture<Item = (A, Option<U>)> { ... }
}
Provided Methods§
Sourcefn filter_fold<F, A, Fut, U>(self, acc: A, f: F) -> FilterFold<Self, F, A, Fut>
fn filter_fold<F, A, Fut, U>(self, acc: A, f: F) -> FilterFold<Self, F, A, Fut>
Create a FilterFold
stream from a stream.
Takes an inital accumulator value and an FnMut
which takes
two parameters, the current accumulator value and the current
value from the stream, and returns a Future
which resolves to
a tuple where the first item is the new accumulator value
and the second item is an Option
. The FilterFold
stream contains
the values that are Some
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<S> FilterFoldStream for Swhere
S: Stream,
Implement filter_fold
for all Stream
s