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

§time_in_seconds_since_epoch: u32

The amount of seconds since unix epoch, the same value obtained by any git_date::Time structure and the way git counts time.

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.