Struct gix_config::path::interpolate::Context
source · pub struct Context<'a> {
pub git_install_dir: Option<&'a Path>,
pub home_dir: Option<&'a Path>,
pub home_for_user: Option<fn(_: &str) -> Option<PathBuf>>,
}
Expand description
Options for interpolating paths with Path::interpolate()
.
Fields§
§git_install_dir: Option<&'a Path>
The location where gitoxide or git is installed. If None
, %(prefix)
in paths will cause an error.
home_dir: Option<&'a Path>
The home directory of the current user. If None
, ~/
in paths will cause an error.
home_for_user: Option<fn(_: &str) -> Option<PathBuf>>
A function returning the home directory of a given user. If None
, ~name/
in paths will cause an error.
Trait Implementations§
impl<'a> Copy for Context<'a>
Auto Trait Implementations§
impl<'a> Freeze for Context<'a>
impl<'a> RefUnwindSafe for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnwindSafe for Context<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)