Struct cfg::sequence::Sequence
[−]
[src]
pub struct Sequence<H> { pub lhs: Symbol, pub rhs: Symbol, pub start: u32, pub end: Option<u32>, pub separator: Separator, pub history: H, }
Sequence rule representation.
Fields
lhs: Symbol
The rule's left-hand side.
rhs: Symbol
The rule's right-hand side.
start: u32
The minimum number of repetitions.
end: Option<u32>
Either the inclusive maximum number of repetitions, or None
if the number of repetitions
is unlimited.
separator: Separator
The way elements are separated in a sequence, or Null
.
history: H
The history carried with the sequence rule.
Methods
impl<H> Sequence<H>
[src]
fn inclusive(self, start: u32, end: Option<u32>) -> Self
Assigns the inclusive range of the number of repetitions.
fn separator(self, sep: Separator) -> Self
Assigns the separator symbol and mode of separation.
Trait Implementations
impl<H: PartialEq> PartialEq for Sequence<H>
[src]
fn eq(&self, __arg_0: &Sequence<H>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Sequence<H>) -> bool
This method tests for !=
.
impl<H: Hash> Hash for Sequence<H>
[src]
fn hash<__HH: Hasher>(&self, __arg_0: &mut __HH)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<H: Eq> Eq for Sequence<H>
[src]
impl<H: Debug> Debug for Sequence<H>
[src]
impl<H: Clone> Clone for Sequence<H>
[src]
fn clone(&self) -> Sequence<H>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more