[][src]Trait combine::stream::state::Positioner

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

type Position: Clone + Ord

The type which keeps track of the position

Loading content...

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

Loading content...

Implementors

impl Positioner<char> for SourcePosition[src]

type Position = SourcePosition

impl<Item> Positioner<Item> for IndexPositioner where
    Item: PartialEq + Clone
[src]

type Position = usize

Loading content...