[][src]Struct devlog::config::Config

pub struct Config { /* fields omitted */ }

Methods

impl Config[src]

pub fn new(repo_dir: &Path, editor_prog: &str) -> Config[src]

Create a new configuration object with the specified configuration values. This is used mainly for testing.

pub fn load() -> Config[src]

Load configuration from environment variables, providing defaults if the environment variables are not defined.

pub fn repo_dir(&self) -> &Path[src]

The directory of the user's devlog repository, which may or may not exist. Defaults to "$HOME/devlogs"

pub fn editor_prog(&self) -> &str[src]

The text editor program for editing devlog entry files. Defaults to "nano".

Auto Trait Implementations

impl Send for Config

impl Sync for Config

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]