pub struct OsConfigSource;Expand description
Config files from the real filesystem, with the user directory resolved by platform convention.
Trait Implementations§
Source§impl ConfigSource for OsConfigSource
impl ConfigSource for OsConfigSource
Source§fn user_config_dir(&self) -> Option<PathBuf>
fn user_config_dir(&self) -> Option<PathBuf>
The user config directory.
None when no home directory can be
determined — then the user file simply does not exist.Source§fn read(&self, path: &Path) -> Result<Option<String>, EngineError>
fn read(&self, path: &Path) -> Result<Option<String>, EngineError>
Contents, or
None when the file does not exist. Any other failure
(permissions, non-UTF-8) is an error.Source§fn read_required(&self, path: &Path) -> Result<String, EngineError>
fn read_required(&self, path: &Path) -> Result<String, EngineError>
Contents of a file the caller named explicitly, where absence is a hard
error rather than a default. Read more
Auto Trait Implementations§
impl Freeze for OsConfigSource
impl RefUnwindSafe for OsConfigSource
impl Send for OsConfigSource
impl Sync for OsConfigSource
impl Unpin for OsConfigSource
impl UnsafeUnpin for OsConfigSource
impl UnwindSafe for OsConfigSource
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