Trait krator::state::State[][src]

pub trait State<S: ResourceState>: Sync + Send + 'static + Debug {
#[must_use]    fn next<'life0, 'async_trait>(
        self: Box<Self>,
        shared: SharedState<S::SharedState>,
        state: &'life0 mut S,
        manifest: Manifest<S::Manifest>
    ) -> Pin<Box<dyn Future<Output = Transition<S>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn status<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        state: &'life1 mut S,
        manifest: &'life2 S::Manifest
    ) -> Pin<Box<dyn Future<Output = Result<S::Status>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }

A trait representing a node in the state graph.

Required methods

#[must_use]fn next<'life0, 'async_trait>(
    self: Box<Self>,
    shared: SharedState<S::SharedState>,
    state: &'life0 mut S,
    manifest: Manifest<S::Manifest>
) -> Pin<Box<dyn Future<Output = Transition<S>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Provider supplies method to be executed when in this state.

#[must_use]fn status<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    state: &'life1 mut S,
    manifest: &'life2 S::Manifest
) -> Pin<Box<dyn Future<Output = Result<S::Status>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Provider supplies JSON status patch to apply when entering this state.

Loading content...

Implementors

Loading content...