ResourceStore

Trait ResourceStore 

Source
pub trait ResourceStore {
    // Required methods
    fn self_uri(&self) -> Uri;
    fn add<'life0, 'async_trait>(
        &'life0 mut self,
        resource: ResourceAny,
        name: ResourceTypeId,
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'async_trait>(
        &'life0 mut self,
        resource_id: u64,
    ) -> Pin<Box<dyn Future<Output = Option<(ResourceTypeId, ResourceAny)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn borrow<'life0, 'async_trait>(
        &'life0 self,
        resource_id: u64,
    ) -> Pin<Box<dyn Future<Output = Option<(ResourceTypeId, ResourceAny)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn self_uri(&self) -> Uri

Source

fn add<'life0, 'async_trait>( &'life0 mut self, resource: ResourceAny, name: ResourceTypeId, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get<'life0, 'async_trait>( &'life0 mut self, resource_id: u64, ) -> Pin<Box<dyn Future<Output = Option<(ResourceTypeId, ResourceAny)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn borrow<'life0, 'async_trait>( &'life0 self, resource_id: u64, ) -> Pin<Box<dyn Future<Output = Option<(ResourceTypeId, ResourceAny)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§