pub struct RuleBuilder<Q1, A, Q2, B>{ /* private fields */ }Expand description
RuleBuilder is a utilitarian structure designed to facilitate the construction of
new Rule instances through a step-by-step approach. This builder pattern allows for
incremental specification of rule components, enhancing code readability and
maintainability.
Implementations§
Source§impl<Q1, Q2, A, B> RuleBuilder<Q1, A, Q2, B>
impl<Q1, Q2, A, B> RuleBuilder<Q1, A, Q2, B>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
initialize a new instance of the RuleBuilder
Sourcepub fn state<O>(self, state: State<O>) -> RuleBuilder<O, A, Q2, B>where
O: RawState,
pub fn state<O>(self, state: State<O>) -> RuleBuilder<O, A, Q2, B>where
O: RawState,
configure the current state
Sourcepub fn symbol<C>(self, symbol: C) -> RuleBuilder<Q1, C, Q2, B>
pub fn symbol<C>(self, symbol: C) -> RuleBuilder<Q1, C, Q2, B>
configure the current symbol
Sourcepub fn next_state<O>(self, state: State<O>) -> RuleBuilder<Q1, A, O, B>where
O: RawState,
pub fn next_state<O>(self, state: State<O>) -> RuleBuilder<Q1, A, O, B>where
O: RawState,
configure the next state
Sourcepub fn write_symbol<C>(self, write_symbol: C) -> RuleBuilder<Q1, A, Q2, C>
pub fn write_symbol<C>(self, write_symbol: C) -> RuleBuilder<Q1, A, Q2, C>
configure the write symbol for the rule
Trait Implementations§
Auto Trait Implementations§
impl<Q1, A, Q2, B> Freeze for RuleBuilder<Q1, A, Q2, B>
impl<Q1, A, Q2, B> RefUnwindSafe for RuleBuilder<Q1, A, Q2, B>
impl<Q1, A, Q2, B> Send for RuleBuilder<Q1, A, Q2, B>
impl<Q1, A, Q2, B> Sync for RuleBuilder<Q1, A, Q2, B>
impl<Q1, A, Q2, B> Unpin for RuleBuilder<Q1, A, Q2, B>
impl<Q1, A, Q2, B> UnwindSafe for RuleBuilder<Q1, A, Q2, B>
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