pub struct TransitionMatrix<S: States, const NS: usize, const NE: usize>(/* private fields */);Expand description
A matrix of state transitions.
This structure organizes transitions in a 2D matrix where:
- Rows represent source states (indexed by state index)
- Columns represent events (indexed by event index)
- Each cell contains the destination state for that state-event pair
The matrix allows O(1) lookup of the next state given a current state and event.
§Type Parameters
S: The state type implementingStatesNS: The number of states (rows)NE: The number of events (columns)
Implementations§
Trait Implementations§
Source§impl<S: Clone + States, const NS: usize, const NE: usize> Clone for TransitionMatrix<S, NS, NE>
impl<S: Clone + States, const NS: usize, const NE: usize> Clone for TransitionMatrix<S, NS, NE>
Source§fn clone(&self) -> TransitionMatrix<S, NS, NE>
fn clone(&self) -> TransitionMatrix<S, NS, NE>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug + States, const NS: usize, const NE: usize> Debug for TransitionMatrix<S, NS, NE>
impl<S: Debug + States, const NS: usize, const NE: usize> Debug for TransitionMatrix<S, NS, NE>
Source§impl<S: States, const NS: usize, const NE: usize> Index<usize> for TransitionMatrix<S, NS, NE>
impl<S: States, const NS: usize, const NE: usize> Index<usize> for TransitionMatrix<S, NS, NE>
Source§impl<S: States, const NS: usize, const NE: usize> IndexMut<usize> for TransitionMatrix<S, NS, NE>
impl<S: States, const NS: usize, const NE: usize> IndexMut<usize> for TransitionMatrix<S, NS, NE>
impl<S: Copy + States, const NS: usize, const NE: usize> Copy for TransitionMatrix<S, NS, NE>
Auto Trait Implementations§
impl<S, const NS: usize, const NE: usize> Freeze for TransitionMatrix<S, NS, NE>where
S: Freeze,
impl<S, const NS: usize, const NE: usize> RefUnwindSafe for TransitionMatrix<S, NS, NE>where
S: RefUnwindSafe,
impl<S, const NS: usize, const NE: usize> Send for TransitionMatrix<S, NS, NE>where
S: Send,
impl<S, const NS: usize, const NE: usize> Sync for TransitionMatrix<S, NS, NE>where
S: Sync,
impl<S, const NS: usize, const NE: usize> Unpin for TransitionMatrix<S, NS, NE>where
S: Unpin,
impl<S, const NS: usize, const NE: usize> UnwindSafe for TransitionMatrix<S, NS, NE>where
S: UnwindSafe,
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