pub trait ConfigReader<T>: ConfigLoader<T>{
// Provided methods
fn get_config_file_path(expanded_path: &Path) -> PathBuf { ... }
fn write_default_config_file(config_file_path: &PathBuf) -> Result<()> { ... }
fn read_config_file<'async_trait>(
expanded_path: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<T, DynError>> + Send + 'async_trait>>
where Self: Send + 'async_trait { ... }
}Provided Methods§
Sourcefn get_config_file_path(expanded_path: &Path) -> PathBuf
fn get_config_file_path(expanded_path: &Path) -> PathBuf
Returns the config file path in this directory
fn write_default_config_file(config_file_path: &PathBuf) -> Result<()>
Sourcefn read_config_file<'async_trait>(
expanded_path: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<T, DynError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
fn read_config_file<'async_trait>(
expanded_path: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<T, DynError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
Given a directory path, ensures the directory exists, writes a default
config.toml if absent, then parses and returns the loaded config
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.