#[non_exhaustive]pub struct Weighted {
pub recursive_weight: u32,
pub non_recursive_weight: u32,
/* private fields */
}Expand description
Weights expressions by whether they contain a recursive reference to the current nonterminal (higher weight for recursive, for fuzzing / stress testing).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.recursive_weight: u32Weight for an expression that contains the current nonterminal (recursive).
non_recursive_weight: u32Weight for an expression that does not.
Implementations§
Trait Implementations§
Source§impl GenerationStrategy for Weighted
impl GenerationStrategy for Weighted
Source§fn choose<'p>(
&mut self,
production: &'p Production,
_depth: usize,
) -> Option<&'p Expression>
fn choose<'p>( &mut self, production: &'p Production, _depth: usize, ) -> Option<&'p Expression>
Choose one of the production’s RHS alternatives. Read more
Auto Trait Implementations§
impl Freeze for Weighted
impl RefUnwindSafe for Weighted
impl Send for Weighted
impl Sync for Weighted
impl Unpin for Weighted
impl UnwindSafe for Weighted
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