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,
Split a stream into two streams based on predicate.
predicate