pub trait InputTakeAtPosition: Sized {
type Item;
// Required methods
fn split_at_position<P>(
&self,
predicate: P,
) -> Result<(Self, Self), Err<Self>>
where P: Fn(Self::Item) -> bool;
fn split_at_position1<P>(
&self,
predicate: P,
e: ErrorKind,
) -> Result<(Self, Self), Err<Self>>
where P: Fn(Self::Item) -> bool;
}
Expand description
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
Required Associated Types§
Required Methods§
fn split_at_position<P>(&self, predicate: P) -> Result<(Self, Self), Err<Self>>
fn split_at_position1<P>( &self, predicate: P, e: ErrorKind, ) -> Result<(Self, Self), Err<Self>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.