Trait armature::stator::Stator[][src]

pub trait Stator: Sender + Handler + Sized + Send {
    const INIT: State<Self, Self::Event>;

    fn get_stator_component_mut(
        &mut self
    ) -> &mut StatorComponent<Self, Self::Event>;
fn get_stator_component(&self) -> &StatorComponent<Self, Self::Event>; fn get_parent_state(
        &mut self,
        state: State<Self, Self::Event>
    ) -> Option<State<Self, Self::Event>> { ... }
fn handle(&mut self, event: &Self::Event) { ... }
fn call_handler(
        &mut self,
        handler: State<Self, Self::Event>,
        event: &Self::Event
    ) { ... }
fn init(&mut self) { ... }
fn transition(&mut self, target: State<Self, Self::Event>) { ... }
fn defer(&mut self, event: &Self::Event) { ... }
fn recall_all(&mut self) { ... }
fn recall_front(&mut self) { ... }
fn recall_back(&mut self) { ... }
fn clear_defered(&mut self) { ... } }

Associated Constants

Required methods

Get a mutable reference to the stator component.

Get a immutable reference to the stator component.

Provided methods

Get the parent state of a given state. If a state has no parent state (most likely because it is the root state) the result will be an error.

Handle an event from within the current state.

Handle an event from a given state.

Perform the transition into the initial state starting from the root state.

Perform a transition from the current state towards the target state.

Defer an event for the moment so you can recall it later.

Recall all events that had been defered.

Recall the event that is in the front of the defered event queue.

Recall the event that is in the back of the defered event queue.

Clear all the events from the defered event queue.

Implementors