[][src]Trait xaynet::state_machine::phases::Phase

pub trait Phase<R> {
    const NAME: PhaseName;

#[must_use]    fn run<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn next(self) -> Option<StateMachine<R>>; }

A trait that must be implemented by a state in order to move to a next state.

Associated Constants

const NAME: PhaseName

Name of the current phase

Loading content...

Required methods

#[must_use]fn run<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Run this phase to completion

fn next(self) -> Option<StateMachine<R>>

Moves from this state to the next state.

Loading content...

Implementors

impl<R> Phase<R> for PhaseState<R, StateError> where
    R: Send
[src]

fn next(self) -> Option<StateMachine<R>>[src]

Moves from the error state to the next state.

See the module level documentation for more details.

impl<R> Phase<R> for PhaseState<R, Idle> where
    R: Send
[src]

fn run<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Moves from the idle state to the next state.

See the module level documentation for more details.

impl<R> Phase<R> for PhaseState<R, Shutdown> where
    R: Send
[src]

fn run<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Shuts down the StateMachine.

See the module level documentation for more details.

impl<R> Phase<R> for PhaseState<R, Sum> where
    Self: Handler<R> + Purge<R>,
    R: Send
[src]

fn run<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Run the sum phase.

See the module level documentation for more details.

impl<R> Phase<R> for PhaseState<R, Sum2> where
    Self: Purge<R> + Handler<R>,
    R: Send
[src]

fn run<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Run the sum2 phase

See the module level documentation for more details.

fn next(self) -> Option<StateMachine<R>>[src]

Moves from the sum2 state to the next state.

See the module level documentation for more details.

impl<R> Phase<R> for PhaseState<R, Unmask> where
    R: Send
[src]

fn run<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Run the unmasking phase

fn next(self) -> Option<StateMachine<R>>[src]

Moves from the unmask state to the next state.

See the module level documentation for more details.

impl<R> Phase<R> for PhaseState<R, Update> where
    Self: Handler<R> + Purge<R>,
    R: Send
[src]

fn run<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), StateError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Moves from the update state to the next state.

See the module level documentation for more details.

Loading content...