[][src]Struct cfg::sequence::builder::SequenceRuleBuilder

pub struct SequenceRuleBuilder<H, D, Hs = NullHistorySource> { /* fields omitted */ }

Sequence rule builder.

Methods

impl<H, D> SequenceRuleBuilder<H, D> where
    D: SequenceDestination<H>,
    H: RewriteSequence
[src]

pub fn new(destination: D) -> Self[src]

Creates a sequence rule builder.

impl<H, D, Hs> SequenceRuleBuilder<H, D, Hs> where
    D: SequenceDestination<H>,
    H: RewriteSequence
[src]

pub fn default_history<Hs2>(self, state: Hs2) -> SequenceRuleBuilder<H, D, Hs2>[src]

Sets the default history source.

pub fn sequence(self, lhs: Symbol) -> Self[src]

Starts building a sequence rule.

pub fn separator(self, sep: Separator) -> Self[src]

Assigns the separator symbol and mode of separation.

pub fn intersperse(self, sym: Symbol) -> Self[src]

Sets proper separation with the given separator symbol.

pub fn history(self, history: H) -> Self[src]

Assigns the rule history, which is used on the next call to rhs, or overwritten by a call to rhs_with_history.

pub fn inclusive(self, start: u32, end: Option<u32>) -> Self[src]

Assigns the inclusive range of the number of repetitions.

pub fn rhs(self, rhs: Symbol) -> Self where
    Hs: HistorySource<H>, 
[src]

Adds a sequence rule to the grammar.

pub fn rhs_with_history(self, rhs: Symbol, history: H) -> Self[src]

Adds a sequence rule to the grammar.

Auto Trait Implementations

impl<H, D, Hs> Send for SequenceRuleBuilder<H, D, Hs> where
    D: Send,
    H: Send,
    Hs: Send

impl<H, D, Hs> Sync for SequenceRuleBuilder<H, D, Hs> where
    D: Sync,
    H: Sync,
    Hs: Sync

impl<H, D, Hs> Unpin for SequenceRuleBuilder<H, D, Hs> where
    D: Unpin,
    H: Unpin,
    Hs: Unpin

impl<H, D, Hs> UnwindSafe for SequenceRuleBuilder<H, D, Hs> where
    D: UnwindSafe,
    H: UnwindSafe,
    Hs: UnwindSafe

impl<H, D, Hs> RefUnwindSafe for SequenceRuleBuilder<H, D, Hs> where
    D: RefUnwindSafe,
    H: RefUnwindSafe,
    Hs: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]