Struct synfuzz::Rule

source ·
pub struct Rule {
    pub rules: Arc<RwLock<HashMap<String, Box<dyn Generator>>>>,
    pub name: String,
}
Expand description

Rule is a Generator for invoking a named rule Generator. This is useful for implementing recursion and avoiding duplication of portions of a grammar.

Only names that have already been registered should be used. If a corresponding rule does not exist when generate is called it will panic.

Fields§

§rules: Arc<RwLock<HashMap<String, Box<dyn Generator>>>>§name: String

Trait Implementations§

Formats the value using the given formatter. Read more
Generate a value from the specific implementation of the Generator
Generate a value of the negation of the specified Generator

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.