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

The rule's left-hand side.

rhs

The rule's right-hand side.

start

The minimum number of repetitions.

end

Either the inclusive maximum number of repetitions, or None if the number of repetitions is unlimited.

separator

The way elements are separated in a sequence, or Null.

history

The history carried with the sequence rule.

Methods

impl<H> Sequence<H>

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

Derived Implementations

impl<H: PartialEq> PartialEq for Sequence<H>

fn eq(&self, __arg_0: &Sequence<H>) -> bool

fn ne(&self, __arg_0: &Sequence<H>) -> bool

impl<H: Hash> Hash for Sequence<H>

fn hash<__HH: Hasher>(&self, __arg_0: &mut __HH)

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<H: Eq> Eq for Sequence<H>

impl<H: Debug> Debug for Sequence<H>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<H: Clone> Clone for Sequence<H>

fn clone(&self) -> Sequence<H>

1.0.0fn clone_from(&mut self, source: &Self)