pub struct RepeatRule {
pub element: Box<Rule>,
pub separator: Box<Rule>,
pub at_least: AtLeast,
pub allow_trailing: bool,
}Expand description
Repeats a rule a number of times, the repetition choice being decided by the operator used:
*repeats zero or more times+repeats one or more times
The first operand is the element and the second is the separator.
For example, "x" ',' * matches multiple instances of the keyword x, separated by commas.
Trailing is enabled with the ~ modifier.
Fields§
§element: Box<Rule>§separator: Box<Rule>§at_least: AtLeast§allow_trailing: boolTrait Implementations§
Source§impl Clone for RepeatRule
impl Clone for RepeatRule
Source§fn clone(&self) -> RepeatRule
fn clone(&self) -> RepeatRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RepeatRule
impl Debug for RepeatRule
Source§impl Hash for RepeatRule
impl Hash for RepeatRule
Source§impl Ord for RepeatRule
impl Ord for RepeatRule
Source§fn cmp(&self, other: &RepeatRule) -> Ordering
fn cmp(&self, other: &RepeatRule) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RepeatRule
impl PartialEq for RepeatRule
Source§impl PartialOrd for RepeatRule
impl PartialOrd for RepeatRule
impl Eq for RepeatRule
impl StructuralPartialEq for RepeatRule
Auto Trait Implementations§
impl Freeze for RepeatRule
impl RefUnwindSafe for RepeatRule
impl Send for RepeatRule
impl Sync for RepeatRule
impl Unpin for RepeatRule
impl UnsafeUnpin for RepeatRule
impl UnwindSafe for RepeatRule
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