starbase

Trait AppSession

Source
pub trait AppSession:
    Clone
    + Send
    + Sync {
    // Provided methods
    fn startup<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn analyze<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn execute<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn shutdown<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Provided Methods§

Source

fn startup<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run operations at the start of the application process to setup the initial state of the session.

Source

fn analyze<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run operations after the session state has been created, but before the main execution.

Source

fn execute<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run operations in the background of the main execution. The main execution is defined in App#run, not here.

Source

fn shutdown<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = AppResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run operations on success or failure of the other phases.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§