[−][src]Struct stateright::Path
A path of states including actions. i.e. state --action--> state ... --action--> state
.
You can convert to a Vec<_>
with path.into_vec()
. If you only need the actions, then use
path.into_actions()
.
Implementations
impl<State, Action> Path<State, Action>
[src]
pub fn from_actions<'a, M>(
model: &M,
init_state: State,
actions: impl IntoIterator<Item = &'a Action>
) -> Option<Self> where
M: Model<State = State, Action = Action>,
State: PartialEq,
Action: PartialEq + 'a,
[src]
model: &M,
init_state: State,
actions: impl IntoIterator<Item = &'a Action>
) -> Option<Self> where
M: Model<State = State, Action = Action>,
State: PartialEq,
Action: PartialEq + 'a,
Constructs a path from a model, initial state, and a sequence of actions. Panics for inputs unreachable via the model.
pub fn last_state(&self) -> &State
[src]
Extracts the last state.
pub fn into_actions(self) -> Vec<Action>
[src]
Extracts the actions.
pub fn into_vec(self) -> Vec<(State, Option<Action>)>
[src]
Convenience method for Into<Vec<_>>
.
pub fn encode(&self) -> String where
State: Hash,
[src]
State: Hash,
Encodes the path as a sequence of opaque "fingerprints" delimited by forward
slash (/
) characters.
Trait Implementations
impl<State: Clone, Action: Clone> Clone for Path<State, Action>
[src]
pub fn clone(&self) -> Path<State, Action>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<State: Debug, Action: Debug> Debug for Path<State, Action>
[src]
impl<State, Action> Into<Vec<(State, Option<Action>), Global>> for Path<State, Action>
[src]
impl<State: PartialEq, Action: PartialEq> PartialEq<Path<State, Action>> for Path<State, Action>
[src]
pub fn eq(&self, other: &Path<State, Action>) -> bool
[src]
pub fn ne(&self, other: &Path<State, Action>) -> bool
[src]
impl<State, Action> StructuralPartialEq for Path<State, Action>
[src]
Auto Trait Implementations
impl<State, Action> RefUnwindSafe for Path<State, Action> where
Action: RefUnwindSafe,
State: RefUnwindSafe,
Action: RefUnwindSafe,
State: RefUnwindSafe,
impl<State, Action> Send for Path<State, Action> where
Action: Send,
State: Send,
Action: Send,
State: Send,
impl<State, Action> Sync for Path<State, Action> where
Action: Sync,
State: Sync,
Action: Sync,
State: Sync,
impl<State, Action> Unpin for Path<State, Action> where
Action: Unpin,
State: Unpin,
Action: Unpin,
State: Unpin,
impl<State, Action> UnwindSafe for Path<State, Action> where
Action: UnwindSafe,
State: UnwindSafe,
Action: UnwindSafe,
State: 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub 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>,