Struct chomp::types::numbering::InputPosition
[−]
[src]
pub struct InputPosition<I: Input, N: Numbering<Token = I::Token>> { /* fields omitted */ }
Wrapper around an Input
implementation providing numbering support.
Methods
impl<I: Input, N: Numbering<Token = I::Token>> InputPosition<I, N>
[src]
fn new(i: I, n: N) -> Self
Creates a new input position instance.
fn position(&self) -> N
Obtains the current position of the numbering.
Trait Implementations
impl<I: Debug + Input, N: Debug + Numbering<Token = I::Token>> Debug for InputPosition<I, N>
[src]
impl<I: Input, N: Numbering<Token = I::Token>> IntoInner for InputPosition<I, N>
[src]
type Inner = (I, N)
The inner type to be revealed.
fn into_inner(self) -> Self::Inner
Primitive: Consumes self and reveals the inner state. Read more
impl<I: Input, N: Numbering<Token = I::Token>> Input for InputPosition<I, N>
[src]
type Token = I::Token
The token type of the input.
type Marker = (N, I::Marker)
type Buffer = I::Buffer
The buffer type yielded by this input when multiple tokens are consumed in sequence. Read more
fn _peek(&mut self, g: Guard) -> Option<Self::Token>
fn _pop(&mut self, g: Guard) -> Option<Self::Token>
fn _consume(&mut self, g: Guard, n: usize) -> Option<Self::Buffer>
fn _consume_while<F>(&mut self, g: Guard, f: F) -> Self::Buffer where
F: FnMut(Self::Token) -> bool,
F: FnMut(Self::Token) -> bool,
fn _consume_from(&mut self, g: Guard, m: Self::Marker) -> Self::Buffer
fn _consume_remaining(&mut self, g: Guard) -> Self::Buffer
fn _mark(&self, g: Guard) -> Self::Marker
fn _restore(self, g: Guard, m: Self::Marker) -> Self
fn ret<T, E>(self, t: T) -> ParseResult<Self, T, E>
Returns t
as a success value in the parsing context. Read more
fn err<T, E>(self, e: E) -> ParseResult<Self, T, E>
Returns e
as an error value in the parsing context. Read more
fn from_result<T, E>(self, r: Result<T, E>) -> ParseResult<Self, T, E>
Converts a Result
into a ParseResult
, preserving parser state. Read more