pub enum Source {
GitInstallation,
System,
Git,
Local,
}
Expand description
A list of known global sources for git attribute files in order of ascending precedence.
This means that values from the first variant will be returned first.
Variants§
GitInstallation
The attribute file that the installation itself ships with.
System
System-wide attributes file. This is typically defined as
$(prefix)/etc/gitattributes
(where prefix is the git-installation directory).
Git
This is <xdg-config-home>/git/attributes
and is git application configuration per user.
Note that there is no ~/.gitattributes
file.
Local
The configuration of the repository itself, located in $GIT_DIR/info/attributes
.
Implementations§
source§impl Source
impl Source
sourcepub fn storage_location(
self,
env_var: &mut dyn FnMut(&str) -> Option<OsString>,
) -> Option<Cow<'static, Path>>
pub fn storage_location( self, env_var: &mut dyn FnMut(&str) -> Option<OsString>, ) -> Option<Cow<'static, Path>>
Produce a storage location for the this source while potentially querying environment variables using env_var(<name>)
,
or None
if the storage location could not be obtained.
Note that local sources are returned as relative paths to be joined with the base in a separate step.
Trait Implementations§
source§impl Ord for Source
impl Ord for Source
source§impl PartialOrd for Source
impl PartialOrd for Source
impl Copy for Source
impl Eq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)