Struct jarida::Config [−][src]
Fields
temp_dir: Option<PathBuf>
The temporary work directory
journal_dir: Option<PathBuf>
The directory to save all journal data in
editor: PathBuf
The path to the user’s editor of choice
user: Option<String>
The name of the user
password: Option<String>
Password
Implementations
impl Config
[src]
pub const DIR_NAME: &'static str
[src]
The name of the configuration directory.
pub const FILE_NAME: &'static str
[src]
The name of the configuration file.
pub fn find() -> Result<Config>
[src]
Find the configuration file and parse it.
Returns an error if the file cannot be found or is invalid/malformed.
pub fn find_config_file_path() -> Result<PathBuf>
[src]
Try to find the config file, first in a parent directory, then in the user’s home directory. The file may not exist.
An error is returned if the configuration directory cannot be found.
pub fn find_config_dir_path() -> Result<PathBuf>
[src]
Try to find the config directory, first in a parent directory, then in the user’s home directory. If the directory cannot be found an error is returned/
pub fn get_user_config_dir_path() -> Result<PathBuf>
[src]
Get the expected path to the config direcotry in the user’s home directory.
The file may not exist. If the user’s home directory could not be found an error is returned.
pub fn data_store_path(&self) -> PathBuf
[src]
Get the path to the directory containing journal data.
pub fn template() -> &'static str
[src]
Get the contents of a template config.toml file.
Trait Implementations
impl Debug for Config
[src]
impl<'de> Deserialize<'de> for Config
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl FromStr for Config
[src]
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,