pub trait Host: Send {
// Required methods
fn get(
&mut self,
key: String,
) -> impl Future<Output = Result<Result<Option<String>, Error>>> + Send;
fn get_all(
&mut self,
) -> impl Future<Output = Result<Result<Vec<(String, String)>, Error>>> + Send;
}Required Methods§
Sourcefn get(
&mut self,
key: String,
) -> impl Future<Output = Result<Result<Option<String>, Error>>> + Send
fn get( &mut self, key: String, ) -> impl Future<Output = Result<Result<Option<String>, Error>>> + Send
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.
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
impl<_T: Host + ?Sized + Send> Host for &mut _T
Source§fn get(
&mut self,
key: String,
) -> impl Future<Output = Result<Result<Option<String>, Error>>> + Send
fn get( &mut self, key: String, ) -> impl Future<Output = Result<Result<Option<String>, Error>>> + Send
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.