[−][src]Struct automafish::Builder
A state machine builder.
The Builder
allows defining the state machine as a Nondeterministic Finite Automaton using
Self::add_state
and Self::add_transition
methods. Once the state machine is described in such a way
the final StateMachine
can be built with the Self::build
method.
Implementations
impl<TCriteria, TAction> Builder<TCriteria, TAction> where
TCriteria: Criteria,
[src]
TCriteria: Criteria,
pub fn new() -> Self
[src]
Create a new Builder
pub fn create_initial_state(&mut self) -> StateRef
[src]
Create a new initial state.
Each initial state is unique in regards to their transitions. Multiple initial states may be used to separate automata that might have different transitions to their initial states.
pub fn add_state(&mut self, state: State<TAction>) -> StateRef
[src]
Add a new state to the builder.
pub fn add_transition(&mut self, transition: Transition<TCriteria>)
[src]
Add a new transition between builder states.
pub fn build(self) -> StateMachine<TCriteria, TAction>
[src]
Consume the builder, returning a final StateMachine
.
Trait Implementations
impl<TCriteria: Debug, TAction: Debug> Debug for Builder<TCriteria, TAction>
[src]
impl<TCriteria, TAction> Default for Builder<TCriteria, TAction> where
TCriteria: Criteria,
[src]
TCriteria: Criteria,
Auto Trait Implementations
impl<TCriteria, TAction> RefUnwindSafe for Builder<TCriteria, TAction> where
TAction: RefUnwindSafe,
TCriteria: RefUnwindSafe,
TAction: RefUnwindSafe,
TCriteria: RefUnwindSafe,
impl<TCriteria, TAction> Send for Builder<TCriteria, TAction> where
TAction: Send,
TCriteria: Send,
TAction: Send,
TCriteria: Send,
impl<TCriteria, TAction> Sync for Builder<TCriteria, TAction> where
TAction: Sync,
TCriteria: Sync,
TAction: Sync,
TCriteria: Sync,
impl<TCriteria, TAction> Unpin for Builder<TCriteria, TAction> where
TAction: Unpin,
TCriteria: Unpin,
TAction: Unpin,
TCriteria: Unpin,
impl<TCriteria, TAction> UnwindSafe for Builder<TCriteria, TAction> where
TAction: UnwindSafe,
TCriteria: UnwindSafe,
TAction: UnwindSafe,
TCriteria: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,