Skip to main content

partition

Function partition 

Source
pub fn partition<S, T, F>(
    stream: S,
    predicate: F,
) -> (impl Stream<Item = T> + Send + 'static, impl Stream<Item = T> + Send + 'static)
where S: Stream<Item = T> + Send + 'static, T: Send + 'static, F: FnMut(&T) -> bool + Send + 'static,
Expand description

Split a stream into two streams based on predicate.