pub struct Rule<'a> {
pub symbol: Symbol,
pub children: &'a [StateId],
pub result: StateId,
pub weight: f64,
}Expand description
Borrowed view of one transition rule in an Explicit automaton.
A rule means: when a node has symbol and its children have exactly
children, the node may receive result.
Fields§
§symbol: SymbolSymbol on the tree node matched by this rule.
children: &'a [StateId]Required child-state tuple, in left-to-right child order.
result: StateIdState assigned to the parent node when the rule applies.
weight: f64Weight assigned to this transition rule.
Trait Implementations§
impl<'a> Copy for Rule<'a>
impl<'a> StructuralPartialEq for Rule<'a>
Auto Trait Implementations§
impl<'a> Freeze for Rule<'a>
impl<'a> RefUnwindSafe for Rule<'a>
impl<'a> Send for Rule<'a>
impl<'a> Sync for Rule<'a>
impl<'a> Unpin for Rule<'a>
impl<'a> UnsafeUnpin for Rule<'a>
impl<'a> UnwindSafe for Rule<'a>
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