[−][src]Trait combine::stream::position::Positioner
Trait for tracking the current position of a Stream
.
Associated Types
Loading content...Required methods
fn position(&self) -> Self::Position
Returns the current position
fn update(&mut self, token: &Item)
Updates the position given that token
has been taken from the stream
fn checkpoint(&self) -> Self::Checkpoint
fn reset(&mut self, checkpoint: Self::Checkpoint)
Implementations on Foreign Types
impl<Item, T: ?Sized, '_> Positioner<Item> for &'_ mut T where
Item: Clone,
T: Positioner<Item>,
[src]
Item: Clone,
T: Positioner<Item>,
type Position = T::Position
type Checkpoint = T::Checkpoint
fn position(&self) -> T::Position
[src]
fn update(&mut self, item: &Item)
[src]
fn checkpoint(&self) -> Self::Checkpoint
[src]
fn reset(&mut self, checkpoint: Self::Checkpoint)
[src]
Implementors
impl Positioner<char> for SourcePosition
[src]
type Position = SourcePosition
type Checkpoint = Self
fn position(&self) -> SourcePosition
[src]
fn update(&mut self, token: &char)
[src]
fn checkpoint(&self) -> Self::Checkpoint
[src]
fn reset(&mut self, checkpoint: Self::Checkpoint)
[src]
impl Positioner<u8> for SourcePosition
[src]
type Position = SourcePosition
type Checkpoint = Self
fn position(&self) -> SourcePosition
[src]
fn update(&mut self, token: &u8)
[src]
fn checkpoint(&self) -> Self::Checkpoint
[src]
fn reset(&mut self, checkpoint: Self::Checkpoint)
[src]
impl<Item> Positioner<Item> for IndexPositioner where
Item: Clone,
[src]
Item: Clone,