pub struct RecordedTransition<S: 'static, T: 'static> {
pub machine: MachineDescriptor,
pub from: S,
pub transition: T,
pub chosen: S,
}Expand description
A runtime record of one chosen transition.
Fields§
§machine: MachineDescriptorRust-facing identity of the machine family.
from: SExact source state where the transition was taken.
transition: TExact transition site that was chosen.
chosen: SExact target state that actually happened at runtime.
Implementations§
Source§impl<S, T> RecordedTransition<S, T>where
S: 'static,
T: 'static,
impl<S, T> RecordedTransition<S, T>where
S: 'static,
T: 'static,
Sourcepub const fn new(
machine: MachineDescriptor,
from: S,
transition: T,
chosen: S,
) -> Self
pub const fn new( machine: MachineDescriptor, from: S, transition: T, chosen: S, ) -> Self
Builds a runtime transition record from typed machine ids.
Sourcepub fn transition_in<'a>(
&self,
graph: &'a MachineGraph<S, T>,
) -> Option<&'a TransitionDescriptor<S, T>>
pub fn transition_in<'a>( &self, graph: &'a MachineGraph<S, T>, ) -> Option<&'a TransitionDescriptor<S, T>>
Finds the static transition descriptor for this runtime event.
Sourcepub fn source_state_in<'a>(
&self,
graph: &'a MachineGraph<S, T>,
) -> Option<&'a StateDescriptor<S>>
pub fn source_state_in<'a>( &self, graph: &'a MachineGraph<S, T>, ) -> Option<&'a StateDescriptor<S>>
Finds the static source-state descriptor for this runtime event.
Sourcepub fn chosen_state_in<'a>(
&self,
graph: &'a MachineGraph<S, T>,
) -> Option<&'a StateDescriptor<S>>
pub fn chosen_state_in<'a>( &self, graph: &'a MachineGraph<S, T>, ) -> Option<&'a StateDescriptor<S>>
Finds the static chosen-target descriptor for this runtime event.
Trait Implementations§
Source§impl<S: Clone + 'static, T: Clone + 'static> Clone for RecordedTransition<S, T>
impl<S: Clone + 'static, T: Clone + 'static> Clone for RecordedTransition<S, T>
Source§fn clone(&self) -> RecordedTransition<S, T>
fn clone(&self) -> RecordedTransition<S, T>
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 moreimpl<S: Copy + 'static, T: Copy + 'static> Copy for RecordedTransition<S, T>
impl<S: Eq + 'static, T: Eq + 'static> Eq for RecordedTransition<S, T>
impl<S: 'static, T: 'static> StructuralPartialEq for RecordedTransition<S, T>
Auto Trait Implementations§
impl<S, T> Freeze for RecordedTransition<S, T>
impl<S, T> RefUnwindSafe for RecordedTransition<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for RecordedTransition<S, T>
impl<S, T> Sync for RecordedTransition<S, T>
impl<S, T> Unpin for RecordedTransition<S, T>
impl<S, T> UnsafeUnpin for RecordedTransition<S, T>where
S: UnsafeUnpin,
T: UnsafeUnpin,
impl<S, T> UnwindSafe for RecordedTransition<S, T>where
S: UnwindSafe,
T: 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