pub trait Getter {
// Required method
fn get<T: DeserializeOwned>(
&mut self,
file_path: &str,
key: &str
) -> Result<T, Error>;
}Expand description
Getter offers the ability to get configuration values from previously
extracted packages.
Required Methods§
sourcefn get<T: DeserializeOwned>(
&mut self,
file_path: &str,
key: &str
) -> Result<T, Error>
fn get<T: DeserializeOwned>( &mut self, file_path: &str, key: &str ) -> Result<T, Error>
Get provides the configuration value for the specified key combination.
Arguments
file_path- string indicating the file path relative to the configuration’s extractor target path.key- index that supports nesting by using ‘:’, i.e.Root:Parent:Child:ExampleString.
Returns
- Ok(
T) - the configuration value with the specified type. - Err(
Error) - error indicating what went wrong.
Object Safety§
This trait is not object safe.