pub trait ScanOrderedExt<T>: Stream<Item = StreamItem<T>> + Sizedwhere
T: Fluxion,
T::Inner: Clone + Debug + Ord + Unpin + Send + Sync + 'static,
T::Timestamp: Debug + Ord + Copy + Send + Sync + 'static,{
// Required method
fn scan_ordered<Out, Acc, F>(
self,
initial: Acc,
accumulator: F,
) -> impl Stream<Item = StreamItem<Out>>
where Acc: Send + Sync + 'static,
Out: Fluxion,
Out::Inner: Clone + Debug + Ord + Unpin + Send + Sync + 'static,
Out::Timestamp: From<T::Timestamp> + Debug + Ord + Copy + Send + Sync + 'static,
F: FnMut(&mut Acc, &T::Inner) -> Out::Inner + Send + Sync + 'static;
}Expand description
Extension trait providing the scan_ordered operator for streams.
See the module-level documentation for details and examples.
Required Methods§
Sourcefn scan_ordered<Out, Acc, F>(
self,
initial: Acc,
accumulator: F,
) -> impl Stream<Item = StreamItem<Out>>
fn scan_ordered<Out, Acc, F>( self, initial: Acc, accumulator: F, ) -> impl Stream<Item = StreamItem<Out>>
Accumulates state across stream items, emitting intermediate results.
The scan_ordered operator maintains an accumulator value that is updated for each
input item. For each input, it calls the accumulator function with a mutable
reference to the current state and the input value, producing an output value.
See the module-level documentation for details.
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.