pub struct ConfigLoader;Expand description
Handles loading r2n configuration files
Implementations§
Source§impl ConfigLoader
impl ConfigLoader
Sourcepub fn from_cargo_toml<P: AsRef<Path>>(path: P) -> Result<R2nConfig>
pub fn from_cargo_toml<P: AsRef<Path>>(path: P) -> Result<R2nConfig>
Load config from Cargo.toml in the given directory
Sourcepub fn from_current_dir() -> Result<R2nConfig>
pub fn from_current_dir() -> Result<R2nConfig>
Load config from current directory (reads from Cargo.toml)
Sourcepub fn find_config_in_current_dir() -> Result<PathBuf>
pub fn find_config_in_current_dir() -> Result<PathBuf>
Find Cargo.toml in current directory or parents
Sourcepub fn find_config_from(start_dir: &Path) -> Result<PathBuf>
pub fn find_config_from(start_dir: &Path) -> Result<PathBuf>
Find Cargo.toml starting from a specific directory
Auto Trait Implementations§
impl Freeze for ConfigLoader
impl RefUnwindSafe for ConfigLoader
impl Send for ConfigLoader
impl Sync for ConfigLoader
impl Unpin 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