Trait nom::InputIter[][src]

pub trait InputIter {
    type Item;
    type RawItem;
    type Iter: Iterator<Item = (usize, Self::Item)>;
    type IterElem: Iterator<Item = Self::Item>;
    fn iter_indices(&self) -> Self::Iter;
fn iter_elements(&self) -> Self::IterElem;
fn position<P>(&self, predicate: P) -> Option<usize>
    where
        P: Fn(Self::RawItem) -> bool
;
fn slice_index(&self, count: usize) -> Option<usize>; }

abstracts common iteration operations on the input type

it needs a distinction between Item and RawItem because &[T] iterates on references

Associated Types

Required Methods

returns an iterator over the elements and their byte offsets

returns an iterator over the elements

finds the byte position of the element

get the byte offset from the element's position in the stream

Implementations on Foreign Types

impl<'a> InputIter for &'a [u8]
[src]

impl<'a> InputIter for &'a str
[src]

Implementors