pub struct Config { /* private fields */ }
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(repo_dir: &Path, editor_prog: &str) -> Config
pub fn new(repo_dir: &Path, editor_prog: &str) -> Config
Create a new configuration object with the specified configuration values. This is used mainly for testing.
Sourcepub fn load() -> Config
pub fn load() -> Config
Load configuration from environment variables, providing defaults if the environment variables are not defined.
Sourcepub fn repo_dir(&self) -> &Path
pub fn repo_dir(&self) -> &Path
The directory of the user’s devlog repository, which may or may not exist. Defaults to “$HOME/devlogs”
Sourcepub fn editor_prog(&self) -> &str
pub fn editor_prog(&self) -> &str
The text editor program for editing devlog entry files. Defaults to “nano”.
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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