combine::stream::state

Trait Positioner

Source
pub trait Positioner<Item> {
    type Position: Clone + Ord;

    // Required methods
    fn position(&self) -> Self::Position;
    fn update(&mut self, item: &Item);
}
Expand description

Trait for tracking the current position of a Stream.

Required Associated Types§

Source

type Position: Clone + Ord

The type which keeps track of the position

Required Methods§

Source

fn position(&self) -> Self::Position

Returns the current position

Source

fn update(&mut self, item: &Item)

Updates the position given that item has been taken from the stream

Implementors§