pub struct GitModificationTimes { /* private fields */ }
Expand description
Tracks the time of latest modification of files in git.
Implementations§
Source§impl GitModificationTimes
impl GitModificationTimes
Sourcepub fn new(repo: &Repository) -> Result<Self, Error>
pub fn new(repo: &Repository) -> Result<Self, Error>
Performance: collects all modification times on creation and caches them. This is more efficient for looking up lots of files, but wasteful if you just need to look up a couple files.
Sourcepub fn for_path(&self, path: GitPath<'_>) -> Time
pub fn for_path(&self, path: GitPath<'_>) -> Time
Looks up the Git modification time for a given file path. The path must be relative to the root of the repository.
Sourcepub fn mdate_for_path(&self, path: GitPath<'_>) -> Date
pub fn mdate_for_path(&self, path: GitPath<'_>) -> Date
Looks up the Git creation time for a given file path. The path must be relative to the root of the repository.
Sourcepub fn cdate_for_path(&self, path: GitPath<'_>) -> Date
pub fn cdate_for_path(&self, path: GitPath<'_>) -> Date
Looks up the Git creation time for a given file path. The path must be relative to the root of the repository.
Auto Trait Implementations§
impl Freeze for GitModificationTimes
impl RefUnwindSafe for GitModificationTimes
impl Send for GitModificationTimes
impl Sync for GitModificationTimes
impl Unpin for GitModificationTimes
impl UnwindSafe for GitModificationTimes
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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