Trait combine::stream::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, type Position = usize;impl Positioner<char> for SourcePosition type Position = SourcePosition;