Trait Environments

Source
pub trait Environments: Send + Sync {
    type Env: Environment;

    // Required methods
    fn create<'life0, 'async_trait>(
        &'life0 self,
        id: u64,
    ) -> Pin<Box<dyn Future<Output = Arc<Self::Env>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'async_trait>(
        &'life0 self,
        id: u64,
    ) -> Pin<Box<dyn Future<Output = Option<Arc<Self::Env>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn create<'life0, 'async_trait>( &'life0 self, id: u64, ) -> Pin<Box<dyn Future<Output = Arc<Self::Env>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get<'life0, 'async_trait>( &'life0 self, id: u64, ) -> Pin<Box<dyn Future<Output = Option<Arc<Self::Env>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§