[][src]Trait nom::InputTakeAtPosition

pub trait InputTakeAtPosition: Sized {
    type Item;
    fn split_at_position<P>(&self, predicate: P) -> IResult<Self, Self, u32>
    where
        P: Fn(Self::Item) -> bool
;
fn split_at_position1<P>(
        &self,
        predicate: P,
        e: ErrorKind<u32>
    ) -> IResult<Self, Self, u32>
    where
        P: Fn(Self::Item) -> bool
; }

methods to take as much input as possible until the provided function returns true for the current element

a large part of nom's basic parsers are built using this trait

Associated Types

type Item

Loading content...

Required methods

fn split_at_position<P>(&self, predicate: P) -> IResult<Self, Self, u32> where
    P: Fn(Self::Item) -> bool

fn split_at_position1<P>(
    &self,
    predicate: P,
    e: ErrorKind<u32>
) -> IResult<Self, Self, u32> where
    P: Fn(Self::Item) -> bool

Loading content...

Implementations on Foreign Types

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

type Item = u8

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

type Item = char

Loading content...

Implementors

impl<'a> InputTakeAtPosition for CompleteByteSlice<'a>[src]

type Item = u8

impl<'a> InputTakeAtPosition for CompleteStr<'a>[src]

type Item = char

impl<T: InputLength + InputIter + InputTake + AtEof + Clone + UnspecializedInput> InputTakeAtPosition for T[src]

type Item = <T as InputIter>::RawItem

Loading content...