Skip to main content

AppState

Trait AppState 

Source
pub trait AppState:
    Send
    + Sync
    + 'static {
    // Required method
    fn clear_temporal_data<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The contract for the application’s shared state.

Required Methods§

Source

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

Clears any temporary data from the state, called on a manual disconnect.

Implementations on Foreign Types§

Source§

impl AppState for ()

Source§

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

Implementors§