Trait wasmcloud_runtime::capability::config::runtime::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>, ConfigError>>> + 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)>, ConfigError>>> + 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>, ConfigError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a single opaque config value set at the given key if it exists

source

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

Gets a list of all set config data

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>, ConfigError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a single opaque config value set at the given key if it exists

source§

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

Gets a list of all set config data

Implementors§