Struct synfuzz::JoinWith

source ·
pub struct JoinWith {
    pub generators: Vec<Box<dyn Generator>>,
    pub delimiter: Box<dyn Generator>,
}
Expand description

JoinWith is a Generator that joins a list of Generators with the specified Generator as the delimiter. In the case of the only one Generator being specified in the list no delimiter will be added. This is particularly useful when attempting to match tokens or desiring that be a separator (eg. some whitespace) between them. In that case this should be used instead of Sequence so specify the sequence of tokens for a rule.

Fields§

§generators: Vec<Box<dyn Generator>>§delimiter: Box<dyn Generator>

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.