Trait combine::state::Positioner
[−]
[src]
pub trait Positioner<Item> { type Position: Clone + Ord; fn position(&self) -> Self::Position; fn update(&mut self, item: &Item); }
Trait for tracking the current position of a Stream
.
Associated Types
Required Methods
fn position(&self) -> Self::Position
Returns the current position
fn update(&mut self, item: &Item)
Updates the position given that item
has been taken from the stream
Implementors
impl<Item> Positioner<Item> for IndexPositioner where
Item: PartialEq + Clone,impl Positioner<char> for SourcePosition