Enum gix_traverse::commit::Sorting
source · pub enum Sorting {
Topological,
ByCommitTimeNewestFirst,
ByCommitTimeNewestFirstCutoffOlderThan {
time_in_seconds_since_epoch: u32,
},
}
Expand description
Specify how to sort commits during traversal.
Variants§
Topological
Commits are sorted as they are mentioned in the commit graph.
ByCommitTimeNewestFirst
Commits are sorted by their commit time in descending order, that is newest first.
The sorting applies to all currently queued commit ids and thus is full.
Performance
This mode benefits greatly from having an object_cache in find()
to avoid having to lookup each commit twice.
ByCommitTimeNewestFirstCutoffOlderThan
Fields
This sorting is similar to ByCommitTimeNewestFirst
, but adds a cutoff to not return commits older than
a given time, stopping the iteration once no younger commits is queued to be traversed.
As the query is usually repeated with different cutoff dates, this search mode benefits greatly from an object cache.
Trait Implementations§
impl Copy for Sorting
Auto Trait Implementations§
impl RefUnwindSafe for Sorting
impl Send for Sorting
impl Sync for Sorting
impl Unpin for Sorting
impl UnwindSafe for Sorting
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