Trait parser_combinators::primitives::Positioner [] [src]

pub trait Positioner: Clone + PartialEq {
    type Position: Clone + Ord + Debug;
    fn start() -> Self::Position;
    fn update(&self, position: &mut Self::Position);
}

Positioner represents the operations needed to update a position given an item from the stream When implementing stream for custom token type this must be implemented for that token to allow the position to be updated

Associated Types

type Position: Clone + Ord + Debug

Required Methods

fn start() -> Self::Position

Creates a start position

fn update(&self, position: &mut Self::Position)

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

Implementors