pub struct ConfigLoader;Expand description
Configuration file loader
Implementations§
Source§impl ConfigLoader
impl ConfigLoader
Sourcepub fn discover_config_file() -> Option<PathBuf>
pub fn discover_config_file() -> Option<PathBuf>
Discover and load configuration file from standard search paths
Search order:
- ./openapi-nexus-config.toml
- ./.openapi-nexus-config.toml
- ~/.config/openapi-nexus/config.toml
- /etc/openapi-nexus/config.toml
Sourcepub fn load_from_file<P: AsRef<Path>>(
path: P,
) -> Result<ConfigFile, ConfigError>
pub fn load_from_file<P: AsRef<Path>>( path: P, ) -> Result<ConfigFile, ConfigError>
Load configuration from a specific file path
Sourcepub fn load_or_default() -> ConfigFile
pub fn load_or_default() -> ConfigFile
Load configuration from discovered file or return default
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