pub struct UniformRandomRuleSelector;Expand description
Default rule selector. Randomly selects one of the matching rules for every encountered non-terminal symbol.
Implementations§
Trait Implementations§
Source§impl Default for UniformRandomRuleSelector
impl Default for UniformRandomRuleSelector
Source§impl<Nt, T> RuleSelector<Nt, T> for UniformRandomRuleSelector
impl<Nt, T> RuleSelector<Nt, T> for UniformRandomRuleSelector
fn select_matching_rule<'a>( &self, matching_rules: &[&'a Rule<Nt, T>], ) -> Option<&'a Rule<Nt, T>>
fn select_rule<'a>(
&self,
all_rules: &'a [Rule<Nt, T>],
nonterm_value: &Nt,
) -> Option<&'a Rule<Nt, T>>where
Nt: NonterminalValue,
fn find_matching_rules<'a>(
&self,
all_rules: &'a [Rule<Nt, T>],
nonterm_value: &Nt,
) -> Vec<&'a Rule<Nt, T>>where
Nt: NonterminalValue,
Auto Trait Implementations§
impl Freeze for UniformRandomRuleSelector
impl RefUnwindSafe for UniformRandomRuleSelector
impl Send for UniformRandomRuleSelector
impl Sync for UniformRandomRuleSelector
impl Unpin for UniformRandomRuleSelector
impl UnwindSafe for UniformRandomRuleSelector
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