pub enum Consume {
Consumed,
Empty,
}
Expand description
A flag to indicate whether a parser consumed a token or not.
§Example
assert_eq!(Consume::Empty | Consume::Consumed, Consume::Consumed);
assert_eq!(Consume::Empty & Consume::Consumed, Consume::Empty);
Variants§
Trait Implementations§
Source§impl BitAndAssign for Consume
impl BitAndAssign for Consume
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moreSource§impl BitOrAssign for Consume
impl BitOrAssign for Consume
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moreSource§impl Ord for Consume
impl Ord for Consume
Source§impl PartialOrd for Consume
impl PartialOrd for Consume
impl Copy for Consume
impl Eq for Consume
impl StructuralPartialEq for Consume
Auto Trait Implementations§
impl Freeze for Consume
impl RefUnwindSafe for Consume
impl Send for Consume
impl Sync for Consume
impl Unpin for Consume
impl UnwindSafe for Consume
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more