[−][src]Struct stateright::QuickMachine
A convenience structure for succinctly describing a throwaway StateMachine
.
Fields
init_states: fn() -> Vec<State>
Returns the initial possible states.
actions: fn(_: &State, _: &mut Vec<Action>)
Collects the subsequent possible actions based on a previous state.
next_state: fn(_: &State, _: &Action) -> Option<State>
Converts a previous state and action to a resulting state. None
indicates that the action
does not change the state.
Trait Implementations
impl<State: Clone, Action: Clone> Clone for QuickMachine<State, Action>
[src]
fn clone(&self) -> QuickMachine<State, Action>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<State, Action> StateMachine for QuickMachine<State, Action>
[src]
type State = State
The type of state upon which this machine operates.
type Action = Action
The type of action that transitions between states.
fn init_states(&self) -> Vec<Self::State>
[src]
fn actions(&self, state: &Self::State, actions: &mut Vec<Self::Action>)
[src]
fn next_state(
&self,
last_state: &Self::State,
action: &Self::Action
) -> Option<Self::State>
[src]
&self,
last_state: &Self::State,
action: &Self::Action
) -> Option<Self::State>
fn display_outcome(
&self,
last_state: &Self::State,
action: &Self::Action
) -> Option<String> where
Self::State: Debug,
[src]
&self,
last_state: &Self::State,
action: &Self::Action
) -> Option<String> where
Self::State: Debug,
fn next_steps(
&self,
last_state: &Self::State
) -> Vec<(Self::Action, Self::State)> where
Self::State: Hash,
[src]
&self,
last_state: &Self::State
) -> Vec<(Self::Action, Self::State)> where
Self::State: Hash,
fn next_states(&self, last_state: &Self::State) -> Vec<Self::State>
[src]
fn follow_fingerprints(
&self,
init_states: Vec<Self::State>,
fingerprints: Vec<Fingerprint>
) -> Option<Self::State> where
Self::State: Hash,
[src]
&self,
init_states: Vec<Self::State>,
fingerprints: Vec<Fingerprint>
) -> Option<Self::State> where
Self::State: Hash,
Auto Trait Implementations
impl<State, Action> RefUnwindSafe for QuickMachine<State, Action>
impl<State, Action> Send for QuickMachine<State, Action>
impl<State, Action> Sync for QuickMachine<State, Action>
impl<State, Action> Unpin for QuickMachine<State, Action>
impl<State, Action> UnwindSafe for QuickMachine<State, Action>
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,