pub struct Rule {
pub name: &'static str,
pub root: u32,
pub memoized: bool,
}Expand description
One rule.
Fields§
§name: &'static str§root: u32The node its body compiled to. The matcher does not read this. A Rule node carries the
same number in its b, so entering a rule is a field of a node already in a register rather
than an index into a second table. This is here for the name lookup and for the tests.
memoized: boolWhether upstream memoizes it. Twenty two rules do, and they are the ones deep in the expression grammar that a failing alternative re-enters at the same position over and over.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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