pub struct GitIndex { /* private fields */ }Expand description
Snapshot of git status for paths under a repository root.
Implementations§
Source§impl GitIndex
impl GitIndex
pub fn empty() -> Self
pub fn repo_root(&self) -> Option<&Path>
pub fn status_for(&self, path: &Path) -> GitStatus
Sourcepub fn discover(start: &Path) -> Self
pub fn discover(start: &Path) -> Self
Discover repo from start and load porcelain status (cached).
Sourcepub fn discover_with(start: &Path, untracked: UntrackedMode) -> Self
pub fn discover_with(start: &Path, untracked: UntrackedMode) -> Self
Discover with untracked policy (uses process-wide cache).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitIndex
impl RefUnwindSafe for GitIndex
impl Send for GitIndex
impl Sync for GitIndex
impl Unpin for GitIndex
impl UnsafeUnpin for GitIndex
impl UnwindSafe for GitIndex
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more