Trait wasmcloud_runtime::capability::config::store::Host

source ·
pub trait Host: Send {
    // Required methods
    fn get<'life0, 'async_trait>(
        &'life0 mut self,
        key: String,
    ) -> Pin<Box<dyn Future<Output = Result<Result<Option<String>, Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_all<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Result<Vec<(String, String)>, Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn get<'life0, 'async_trait>( &'life0 mut self, key: String, ) -> Pin<Box<dyn Future<Output = Result<Result<Option<String>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a configuration value of type string associated with the key.

The value is returned as an option<string>. If the key is not found, Ok(none) is returned. If an error occurs, an Err(error) is returned.

source

fn get_all<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Result<Vec<(String, String)>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a list of configuration key-value pairs of type string.

If an error occurs, an Err(error) is returned.

Implementations on Foreign Types§

source§

impl<_T: Host + ?Sized + Send> Host for &mut _T

source§

fn get<'life0, 'async_trait>( &'life0 mut self, key: String, ) -> Pin<Box<dyn Future<Output = Result<Result<Option<String>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a configuration value of type string associated with the key.

The value is returned as an option<string>. If the key is not found, Ok(none) is returned. If an error occurs, an Err(error) is returned.

source§

fn get_all<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Result<Vec<(String, String)>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a list of configuration key-value pairs of type string.

If an error occurs, an Err(error) is returned.

Implementors§