[−][src]Trait nom_whitespace::lib::nom::InputTakeAtPosition
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
Required methods
fn split_at_position<P>(
&self,
predicate: P
) -> Result<(Self, Self), Err<Self, u32>> where
P: Fn(Self::Item) -> bool,
&self,
predicate: P
) -> Result<(Self, Self), Err<Self, u32>> where
P: Fn(Self::Item) -> bool,
fn split_at_position1<P>(
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(Self, Self), Err<Self, u32>> where
P: Fn(Self::Item) -> bool,
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(Self, Self), Err<Self, u32>> where
P: Fn(Self::Item) -> bool,
Implementations on Foreign Types
impl<'a> InputTakeAtPosition for CompleteStr<'a>
[src]
type Item = char
fn split_at_position<P>(
&self,
predicate: P
) -> Result<(CompleteStr<'a>, CompleteStr<'a>), Err<CompleteStr<'a>, u32>> where
P: Fn(<CompleteStr<'a> as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P
) -> Result<(CompleteStr<'a>, CompleteStr<'a>), Err<CompleteStr<'a>, u32>> where
P: Fn(<CompleteStr<'a> as InputTakeAtPosition>::Item) -> bool,
fn split_at_position1<P>(
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(CompleteStr<'a>, CompleteStr<'a>), Err<CompleteStr<'a>, u32>> where
P: Fn(<CompleteStr<'a> as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(CompleteStr<'a>, CompleteStr<'a>), Err<CompleteStr<'a>, u32>> where
P: Fn(<CompleteStr<'a> as InputTakeAtPosition>::Item) -> bool,
impl<'a> InputTakeAtPosition for &'a str
[src]
type Item = char
fn split_at_position<P>(
&self,
predicate: P
) -> Result<(&'a str, &'a str), Err<&'a str, u32>> where
P: Fn(<&'a str as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P
) -> Result<(&'a str, &'a str), Err<&'a str, u32>> where
P: Fn(<&'a str as InputTakeAtPosition>::Item) -> bool,
fn split_at_position1<P>(
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(&'a str, &'a str), Err<&'a str, u32>> where
P: Fn(<&'a str as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(&'a str, &'a str), Err<&'a str, u32>> where
P: Fn(<&'a str as InputTakeAtPosition>::Item) -> bool,
impl<'a> InputTakeAtPosition for CompleteByteSlice<'a>
[src]
type Item = u8
fn split_at_position<P>(
&self,
predicate: P
) -> Result<(CompleteByteSlice<'a>, CompleteByteSlice<'a>), Err<CompleteByteSlice<'a>, u32>> where
P: Fn(<CompleteByteSlice<'a> as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P
) -> Result<(CompleteByteSlice<'a>, CompleteByteSlice<'a>), Err<CompleteByteSlice<'a>, u32>> where
P: Fn(<CompleteByteSlice<'a> as InputTakeAtPosition>::Item) -> bool,
fn split_at_position1<P>(
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(CompleteByteSlice<'a>, CompleteByteSlice<'a>), Err<CompleteByteSlice<'a>, u32>> where
P: Fn(<CompleteByteSlice<'a> as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(CompleteByteSlice<'a>, CompleteByteSlice<'a>), Err<CompleteByteSlice<'a>, u32>> where
P: Fn(<CompleteByteSlice<'a> as InputTakeAtPosition>::Item) -> bool,
impl<'a> InputTakeAtPosition for &'a [u8]
[src]
type Item = u8
fn split_at_position<P>(
&self,
predicate: P
) -> Result<(&'a [u8], &'a [u8]), Err<&'a [u8], u32>> where
P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P
) -> Result<(&'a [u8], &'a [u8]), Err<&'a [u8], u32>> where
P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,
fn split_at_position1<P>(
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(&'a [u8], &'a [u8]), Err<&'a [u8], u32>> where
P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(&'a [u8], &'a [u8]), Err<&'a [u8], u32>> where
P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,
Implementors
impl<T> InputTakeAtPosition for T where
T: InputLength + InputIter + InputTake + UnspecializedInput + AtEof + Clone,
[src]
T: InputLength + InputIter + InputTake + UnspecializedInput + AtEof + Clone,
type Item = <T as InputIter>::RawItem
fn split_at_position<P>(&self, predicate: P) -> Result<(T, T), Err<T, u32>> where
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
[src]
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
fn split_at_position1<P>(
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(T, T), Err<T, u32>> where
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind<u32>
) -> Result<(T, T), Err<T, u32>> where
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,