pub struct XdgPatherBuilder { /* private fields */ }Expand description
Builder for XdgPather.
All fields are optional. Unset fields are resolved from environment variables or XDG defaults.
Implementations§
Source§impl XdgPatherBuilder
impl XdgPatherBuilder
pub fn home(self, path: impl Into<PathBuf>) -> Self
pub fn dotfiles_root(self, path: impl Into<PathBuf>) -> Self
pub fn data_dir(self, path: impl Into<PathBuf>) -> Self
pub fn config_dir(self, path: impl Into<PathBuf>) -> Self
pub fn cache_dir(self, path: impl Into<PathBuf>) -> Self
pub fn xdg_config_home(self, path: impl Into<PathBuf>) -> Self
Sourcepub fn app_support_dir(self, path: impl Into<PathBuf>) -> Self
pub fn app_support_dir(self, path: impl Into<PathBuf>) -> Self
Override the application-support root.
Tests pin this to a non-default location so prefix matches are
deterministic across platforms. End users may also flip this
(typically via the app_uses_library config key, which is
ultimately what wires through here) to opt into Linux-style
~/.config placement on macOS.
pub fn build(self) -> Result<XdgPather>
Trait Implementations§
Source§impl Debug for XdgPatherBuilder
impl Debug for XdgPatherBuilder
Source§impl Default for XdgPatherBuilder
impl Default for XdgPatherBuilder
Source§fn default() -> XdgPatherBuilder
fn default() -> XdgPatherBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for XdgPatherBuilder
impl RefUnwindSafe for XdgPatherBuilder
impl Send for XdgPatherBuilder
impl Sync for XdgPatherBuilder
impl Unpin for XdgPatherBuilder
impl UnsafeUnpin for XdgPatherBuilder
impl UnwindSafe for XdgPatherBuilder
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