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§
Auto Trait Implementations§
impl Freeze for JoinWith
impl !RefUnwindSafe for JoinWith
impl !Send for JoinWith
impl !Sync for JoinWith
impl Unpin for JoinWith
impl !UnwindSafe for JoinWith
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