pub struct FastStateMachineBuilder { /* private fields */ }Expand description
Builder for dense, integer-coded state machine rules.
Implementations§
Source§impl FastStateMachineBuilder
impl FastStateMachineBuilder
Sourcepub const fn state_count(self, count: usize) -> Self
pub const fn state_count(self, count: usize) -> Self
Sets the number of state codes used by this machine.
Sourcepub const fn event_count(self, count: usize) -> Self
pub const fn event_count(self, count: usize) -> Self
Sets the number of event codes used by this machine.
Sourcepub fn initial_state(self, state: usize) -> Self
pub fn initial_state(self, state: usize) -> Self
Registers one initial state code.
Sourcepub fn initial_states(self, states: &[usize]) -> Self
pub fn initial_states(self, states: &[usize]) -> Self
Registers multiple initial state codes.
Sourcepub fn final_state(self, state: usize) -> Self
pub fn final_state(self, state: usize) -> Self
Registers one final state code.
Sourcepub fn final_states(self, states: &[usize]) -> Self
pub fn final_states(self, states: &[usize]) -> Self
Registers multiple final state codes.
Sourcepub fn transition(self, source: usize, event: usize, target: usize) -> Self
pub fn transition(self, source: usize, event: usize, target: usize) -> Self
Adds one transition by source state code, event code, and target state.
Sourcepub const fn cas_policy(self, cas_policy: FastCasPolicy) -> Self
pub const fn cas_policy(self, cas_policy: FastCasPolicy) -> Self
Sets the retry policy used by FastStateMachine for CAS conflicts.
Sourcepub fn build(self) -> Result<FastStateMachine, FastStateMachineBuildError>
pub fn build(self) -> Result<FastStateMachine, FastStateMachineBuildError>
Builds and validates an immutable fast state machine.
Trait Implementations§
Source§impl Clone for FastStateMachineBuilder
impl Clone for FastStateMachineBuilder
Source§fn clone(&self) -> FastStateMachineBuilder
fn clone(&self) -> FastStateMachineBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FastStateMachineBuilder
impl Debug for FastStateMachineBuilder
Auto Trait Implementations§
impl Freeze for FastStateMachineBuilder
impl RefUnwindSafe for FastStateMachineBuilder
impl Send for FastStateMachineBuilder
impl Sync for FastStateMachineBuilder
impl Unpin for FastStateMachineBuilder
impl UnsafeUnpin for FastStateMachineBuilder
impl UnwindSafe for FastStateMachineBuilder
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