pub struct Sequence {
pub lhs: Symbol,
pub rhs: Symbol,
pub start: u32,
pub end: Option<u32>,
pub separator: Separator,
pub history: Option<History>,
}Expand description
Sequence rule representation.
Fields§
§lhs: SymbolThe rule’s left-hand side.
rhs: SymbolThe rule’s right-hand side.
start: u32The minimum number of repetitions.
end: Option<u32>Either the inclusive maximum number of repetitions, or None if the number of repetitions
is unlimited.
separator: SeparatorThe way elements are separated in a sequence, or Null.
history: Option<History>The history carried with the sequence rule.
Implementations§
Source§impl Sequence
impl Sequence
Sourcepub fn inclusive(self, start: u32, end: Option<u32>) -> Self
pub fn inclusive(self, start: u32, end: Option<u32>) -> Self
Assigns the inclusive range of the number of repetitions.
Sourcepub fn separator(self, sep: Separator) -> Self
pub fn separator(self, sep: Separator) -> Self
Assigns the separator symbol and mode of separation.
Sourcepub fn range(self, range: impl RangeBounds<u32>) -> Self
pub fn range(self, range: impl RangeBounds<u32>) -> Self
Adds a range to the sequence.
Trait Implementations§
impl Copy for Sequence
impl Eq for Sequence
impl StructuralPartialEq for Sequence
Auto Trait Implementations§
impl Freeze for Sequence
impl RefUnwindSafe for Sequence
impl Send for Sequence
impl Sync for Sequence
impl Unpin for Sequence
impl UnwindSafe for Sequence
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