Skip to main content

ResourceProvider

Trait ResourceProvider 

Source
pub trait ResourceProvider: Send + Sync {
    // Required methods
    fn list_resources<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ResourceDescriptor>, CapabilityError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn read_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        id: &'life1 ResourceId,
        ctx: &'life2 mut CapabilityContext<'life3>,
    ) -> Pin<Box<dyn Future<Output = Result<ResourceContents, CapabilityError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}

Required Methods§

Source

fn list_resources<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ResourceDescriptor>, CapabilityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn read_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 ResourceId, ctx: &'life2 mut CapabilityContext<'life3>, ) -> Pin<Box<dyn Future<Output = Result<ResourceContents, CapabilityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§