pub struct RuleSet<T> {
pub rules: Vec<Rule<T>>,
}
Expand description
A rule set is just a vector of rules
Fields§
§rules: Vec<Rule<T>>
Implementations§
Source§impl<T: Clone> RuleSet<T>
impl<T: Clone> RuleSet<T>
Sourcepub fn construct_dfa(&self) -> Result<Automata<T>, Error>
pub fn construct_dfa(&self) -> Result<Automata<T>, Error>
Construct a DFA from a rule set
In the resulting DFA, the action of each action state is set to the action of the rule with the highest priority.
If there’s more than one rule with the same priority that matches the same input, then an ambiguity error is returned
Trait Implementations§
impl<T> StructuralPartialEq for RuleSet<T>
Auto Trait Implementations§
impl<T> Freeze for RuleSet<T>
impl<T> RefUnwindSafe for RuleSet<T>where
T: RefUnwindSafe,
impl<T> Send for RuleSet<T>where
T: Send,
impl<T> Sync for RuleSet<T>where
T: Sync,
impl<T> Unpin for RuleSet<T>where
T: Unpin,
impl<T> UnwindSafe for RuleSet<T>where
T: UnwindSafe,
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