Struct cfg::sequence::builder::SequenceRuleBuilder
source · pub struct SequenceRuleBuilder<D> { /* private fields */ }
Expand description
Sequence rule builder.
Implementations§
source§impl<D> SequenceRuleBuilder<D>where
D: SequenceDestination,
impl<D> SequenceRuleBuilder<D>where D: SequenceDestination,
sourcepub fn default_history(
self,
default_history: HistoryId
) -> SequenceRuleBuilder<D>
pub fn default_history( self, default_history: HistoryId ) -> SequenceRuleBuilder<D>
Sets the default history source.
sourcepub fn separator(self, sep: Separator) -> Self
pub fn separator(self, sep: Separator) -> Self
Assigns the separator symbol and mode of separation.
sourcepub fn intersperse(self, sym: Symbol) -> Self
pub fn intersperse(self, sym: Symbol) -> Self
Sets proper separation with the given separator symbol.
sourcepub fn history(self, history: HistoryId) -> Self
pub fn history(self, history: HistoryId) -> Self
Assigns the rule history, which is used on the next call to rhs
, or overwritten by a call
to rhs_with_history
.
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 range(self, range: impl RangeBounds<u32>) -> Self
pub fn range(self, range: impl RangeBounds<u32>) -> Self
Adds a range to the sequence.
sourcepub fn rhs_with_range(self, rhs: Symbol, range: impl RangeBounds<u32>) -> Self
pub fn rhs_with_range(self, rhs: Symbol, range: impl RangeBounds<u32>) -> Self
Adds a sequence rule to the grammar.
sourcepub fn rhs_with_history(
self,
rhs: Symbol,
history_id: Option<HistoryId>
) -> Self
pub fn rhs_with_history( self, rhs: Symbol, history_id: Option<HistoryId> ) -> Self
Adds a sequence rule to the grammar.
Auto Trait Implementations§
impl<D> RefUnwindSafe for SequenceRuleBuilder<D>where D: RefUnwindSafe,
impl<D> Send for SequenceRuleBuilder<D>where D: Send,
impl<D> Sync for SequenceRuleBuilder<D>where D: Sync,
impl<D> Unpin for SequenceRuleBuilder<D>where D: Unpin,
impl<D> UnwindSafe for SequenceRuleBuilder<D>where D: UnwindSafe,
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