pub struct Rule {
pub pattern: &'static str,
pub replacement: &'static [Piece],
pub guard: Option<Guard>,
pub line: u32,
}Expand description
One lowering rule, as much of it as matching needs.
Fields§
§pattern: &'static strThe pattern as it is written in the rule file, for diagnostics and for tests.
replacement: &'static [Piece]What to put in the matched term’s place, flattened into pre-order.
guard: Option<Guard>The condition on the match, if the rule has one.
line: u32The line of the rule file this rule starts on.
Implementations§
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