pub struct ConfigLoader;Expand description
Configuration loader with multiple source support
Implementations§
Source§impl ConfigLoader
impl ConfigLoader
Sourcepub fn load() -> Result<RunMatConfig>
pub fn load() -> Result<RunMatConfig>
Load configuration from all sources with proper precedence
Sourcepub fn discover_config_path_from(start: &Path) -> Option<PathBuf>
pub fn discover_config_path_from(start: &Path) -> Option<PathBuf>
Walk up from the provided directory looking for the first config file.
Sourcepub fn load_from_file(path: &Path) -> Result<RunMatConfig>
pub fn load_from_file(path: &Path) -> Result<RunMatConfig>
Load configuration from a specific file
Sourcepub fn save_to_file(config: &RunMatConfig, path: &Path) -> Result<()>
pub fn save_to_file(config: &RunMatConfig, path: &Path) -> Result<()>
Save configuration to a file
Sourcepub fn generate_sample_config() -> String
pub fn generate_sample_config() -> String
Generate a sample configuration file
Auto Trait Implementations§
impl Freeze for ConfigLoader
impl RefUnwindSafe for ConfigLoader
impl Send for ConfigLoader
impl Sync for ConfigLoader
impl Unpin for ConfigLoader
impl UnsafeUnpin for ConfigLoader
impl UnwindSafe for ConfigLoader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more