Host

Trait Host 

Source
pub trait Host: Send {
    // Required methods
    fn get(
        &mut self,
        key: String,
    ) -> impl Future<Output = Result<Result<Option<String>, ConfigError>>> + Send;
    fn get_all(
        &mut self,
    ) -> impl Future<Output = Result<Result<Vec<(String, String)>, ConfigError>>> + Send;
}

Required Methods§

Source

fn get( &mut self, key: String, ) -> impl Future<Output = Result<Result<Option<String>, ConfigError>>> + Send

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

Source

fn get_all( &mut self, ) -> impl Future<Output = Result<Result<Vec<(String, String)>, ConfigError>>> + Send

Gets a list of all set config data

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

fn get( &mut self, key: String, ) -> impl Future<Output = Result<Result<Option<String>, ConfigError>>> + Send

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

Source§

fn get_all( &mut self, ) -> impl Future<Output = Result<Result<Vec<(String, String)>, ConfigError>>> + Send

Gets a list of all set config data

Implementors§

Source§

impl<H: Handler> Host for Ctx<H>