pub struct PathResolver {
pub home_env: &'static str,
pub data_env: &'static str,
pub project_env: &'static str,
pub config_dir_name: &'static str,
pub data_dir_name: &'static str,
}Expand description
Environment and naming knobs for an application layout.
Fields§
§home_env: &'static strOverride env var for the config/home directory (e.g. ELPH_HOME).
data_env: &'static strOverride env var for the data directory (e.g. ELPH_DATA_DIR).
project_env: &'static strOverride env var for the project directory (e.g. ELPH_PROJECT_DIR).
config_dir_name: &'static strConfig directory name under $HOME (e.g. .elph).
data_dir_name: &'static strData directory name under XDG data home (e.g. elph).
Implementations§
Source§impl PathResolver
impl PathResolver
pub fn resolve(&self) -> Result<ResolvedPaths>
Trait Implementations§
Source§impl Clone for PathResolver
impl Clone for PathResolver
Source§fn clone(&self) -> PathResolver
fn clone(&self) -> PathResolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PathResolver
Source§impl Debug for PathResolver
impl Debug for PathResolver
impl Eq for PathResolver
Source§impl PartialEq for PathResolver
impl PartialEq for PathResolver
Source§fn eq(&self, other: &PathResolver) -> bool
fn eq(&self, other: &PathResolver) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PathResolver
Auto Trait Implementations§
impl Freeze for PathResolver
impl RefUnwindSafe for PathResolver
impl Send for PathResolver
impl Sync for PathResolver
impl Unpin for PathResolver
impl UnsafeUnpin for PathResolver
impl UnwindSafe for PathResolver
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