pub struct TopNode<T, U, V, W>where
T: StateEnum,
U: StateMachineEvent,
V: TopState<State = T, Event = U>,
W: SubstateEnum<T, U, V>,{
pub node: Node<T, U, V, W>,
/* private fields */
}Expand description
The root node of a state tree.
Fields§
§node: Node<T, U, V, W>Implementations§
Source§impl<T, U, V, W> TopNode<T, U, V, W>where
T: StateEnum,
U: StateMachineEvent,
V: TopState<State = T, Event = U>,
W: SubstateEnum<T, U, V>,
impl<T, U, V, W> TopNode<T, U, V, W>where
T: StateEnum,
U: StateMachineEvent,
V: TopState<State = T, Event = U>,
W: SubstateEnum<T, U, V>,
Sourcepub fn top_down_update(&mut self)
pub fn top_down_update(&mut self)
Top-down update this node and its active descendents.
Sourcepub fn transition_quiet(&mut self, target: T, indent: bool, exact: bool)
pub fn transition_quiet(&mut self, target: T, indent: bool, exact: bool)
Transition this node and its active descendents without logging the start and end of the transition.
Sourcepub fn transition(&mut self, target: T, indent: bool, exact: bool)
pub fn transition(&mut self, target: T, indent: bool, exact: bool)
Transition this node and its active descendents.
Sourcepub fn set_name(&mut self, name: String)
Available on crate feature std only.
pub fn set_name(&mut self, name: String)
std only.Set the name of this machine.
Sourcepub fn state_matches(&self, state: T) -> bool
pub fn state_matches(&self, state: T) -> bool
Does this node or any active descendents match a given state?
Sourcepub fn handle_event(&mut self, event: &U)
pub fn handle_event(&mut self, event: &U)
Handle an event.
Auto Trait Implementations§
impl<T, U, V, W> Freeze for TopNode<T, U, V, W>
impl<T, U, V, W> RefUnwindSafe for TopNode<T, U, V, W>
impl<T, U, V, W> Send for TopNode<T, U, V, W>
impl<T, U, V, W> Sync for TopNode<T, U, V, W>
impl<T, U, V, W> Unpin for TopNode<T, U, V, W>
impl<T, U, V, W> UnsafeUnpin for TopNode<T, U, V, W>where
V: UnsafeUnpin,
W: UnsafeUnpin,
impl<T, U, V, W> UnwindSafe for TopNode<T, U, V, W>
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