pub trait TakeWhileExt<TItem, TFilter, S>: Stream<Item = StreamItem<TItem>> + Sizedwhere
TItem: Fluxion,
TItem::Inner: Clone + Debug + Ord + Unpin + Send + Sync + 'static,
TItem::Timestamp: Debug + Ord + Copy + Send + Sync + 'static,
TFilter: Fluxion<Timestamp = TItem::Timestamp>,
TFilter::Inner: Clone + Debug + Ord + Unpin + Send + Sync + 'static,
S: Stream<Item = StreamItem<TFilter>> + Send + Sync + 'static,{
// Required method
fn take_while_with(
self,
filter_stream: S,
filter: impl Fn(&TFilter::Inner) -> bool + Send + Sync + 'static,
) -> impl Stream<Item = StreamItem<TItem>>;
}Expand description
Extension trait providing the take_while_with operator for timestamped streams.
Required Methods§
Sourcefn take_while_with(
self,
filter_stream: S,
filter: impl Fn(&TFilter::Inner) -> bool + Send + Sync + 'static,
) -> impl Stream<Item = StreamItem<TItem>>
fn take_while_with( self, filter_stream: S, filter: impl Fn(&TFilter::Inner) -> bool + Send + Sync + 'static, ) -> impl Stream<Item = StreamItem<TItem>>
Takes elements from the source stream while the filter predicate returns true.
§Arguments
filter_stream- Stream providing filter values that control emissionfilter- Predicate function applied to filter values. Returnstrueto continue.
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.