golem_client::api

Trait ComponentClient

source
pub trait ComponentClient {
    // Required methods
    fn get_components<'life0, 'life1, 'async_trait>(
        &'life0 self,
        component_name: Option<&'life1 str>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Component>, Error<ComponentError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_component<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        component_type: Option<&'life2 ComponentType>,
        component: impl 'async_trait + Into<Body> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn update_component<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        component_id: &'life1 Uuid,
        component_type: Option<&'life2 ComponentType>,
        value: impl 'async_trait + Into<Body> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn download_component<'life0, 'life1, 'async_trait>(
        &'life0 self,
        component_id: &'life1 Uuid,
        version: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error<ComponentError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_component_metadata_all_versions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        component_id: &'life1 Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Component>, Error<ComponentError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_component_metadata<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        component_id: &'life1 Uuid,
        version: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_latest_component_metadata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        component_id: &'life1 Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn get_components<'life0, 'life1, 'async_trait>( &'life0 self, component_name: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Component>, Error<ComponentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn create_component<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, component_type: Option<&'life2 ComponentType>, component: impl 'async_trait + Into<Body> + Send, ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn update_component<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, component_id: &'life1 Uuid, component_type: Option<&'life2 ComponentType>, value: impl 'async_trait + Into<Body> + Send, ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn download_component<'life0, 'life1, 'async_trait>( &'life0 self, component_id: &'life1 Uuid, version: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error<ComponentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_component_metadata_all_versions<'life0, 'life1, 'async_trait>( &'life0 self, component_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<Component>, Error<ComponentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_component_metadata<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, component_id: &'life1 Uuid, version: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn get_latest_component_metadata<'life0, 'life1, 'async_trait>( &'life0 self, component_id: &'life1 Uuid, ) -> Pin<Box<dyn Future<Output = Result<Component, Error<ComponentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§