Enum Lookahead
enum Lookahead
The current lookahead status of a ParserState.
Variants
-
Positive The positive predicate, written as an ampersand &, attempts to match its inner expression. If the inner expression succeeds, parsing continues, but at the same position as the predicate — &foo ~ bar is thus a kind of "AND" statement: "the input string must match foo AND bar". If the inner expression fails, the whole expression fails too.
-
Negative The negative predicate, written as an exclamation mark !, attempts to match its inner expression. If the inner expression fails, the predicate succeeds and parsing continues at the same position as the predicate. If the inner expression succeeds, the predicate fails — !foo ~ bar is thus a kind of "NOT" statement: "the input string must match bar but NOT foo".
-
None No lookahead (i.e. it will consume input).
Implementations
impl Clone for Lookahead
fn clone(self: &Self) -> Lookahead
impl Copy for Lookahead
impl Debug for Lookahead
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Lookahead
impl Freeze for Lookahead
impl PartialEq for Lookahead
fn eq(self: &Self, other: &Lookahead) -> bool
impl RefUnwindSafe for Lookahead
impl Send for Lookahead
impl StructuralPartialEq for Lookahead
impl Sync for Lookahead
impl Unpin for Lookahead
impl UnsafeUnpin for Lookahead
impl UnwindSafe for Lookahead
impl<T> Any for Lookahead
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Lookahead
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Lookahead
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Lookahead
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Lookahead
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Lookahead
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Lookahead
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Lookahead
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Lookahead
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>