pub struct Builder<Find, Predicate> { /* private fields */ }
Expand description
Builder for Topo
.
Implementations§
Source§impl<Find> Builder<Find, fn(_: &oid) -> bool>where
Find: Find,
impl<Find> Builder<Find, fn(_: &oid) -> bool>where
Find: Find,
Sourcepub fn from_iters(
find: Find,
tips: impl IntoIterator<Item = impl Into<ObjectId>>,
ends: Option<impl IntoIterator<Item = impl Into<ObjectId>>>,
) -> Self
pub fn from_iters( find: Find, tips: impl IntoIterator<Item = impl Into<ObjectId>>, ends: Option<impl IntoIterator<Item = impl Into<ObjectId>>>, ) -> Self
Create a new Builder
for a Topo
that reads commits from a repository with find
.
starting at the tips
and ending at the ends
. Like git rev-list --topo-order ^ends tips
.
Sourcepub fn new(find: Find) -> Self
pub fn new(find: Find) -> Self
Create a new Builder
for a Topo
that reads commits from a
repository with find
.
Sourcepub fn with_predicate<Predicate>(
self,
predicate: Predicate,
) -> Builder<Find, Predicate>
pub fn with_predicate<Predicate>( self, predicate: Predicate, ) -> Builder<Find, Predicate>
Set a predicate
to filter out revisions from the walk. Can be used to
implement e.g. filtering on paths or time. This does not exclude the
parent(s) of a revision that is excluded. Specify a revision as an ‘end’
if you want that behavior.
Source§impl<Find, Predicate> Builder<Find, Predicate>
impl<Find, Predicate> Builder<Find, Predicate>
Sourcepub fn with_tips(
self,
tips: impl IntoIterator<Item = impl Into<ObjectId>>,
) -> Self
pub fn with_tips( self, tips: impl IntoIterator<Item = impl Into<ObjectId>>, ) -> Self
Add commits to start reading from.
The behavior is similar to specifying additional ends
in git rev-list --topo-order ^ends tips
.
Sourcepub fn with_ends(
self,
ends: impl IntoIterator<Item = impl Into<ObjectId>>,
) -> Self
pub fn with_ends( self, ends: impl IntoIterator<Item = impl Into<ObjectId>>, ) -> Self
Add commits ending the traversal.
These commits themselves will not be read, i.e. the behavior is similar to specifying additional
ends
in git rev-list --topo-order ^ends tips
.
Sourcepub fn sorting(self, sorting: Sorting) -> Self
pub fn sorting(self, sorting: Sorting) -> Self
Set the sorting
to use for the topological walk.
Sourcepub fn parents(self, parents: Parents) -> Self
pub fn parents(self, parents: Parents) -> Self
Specify how to handle commit parents
during traversal.
Sourcepub fn with_commit_graph(self, commit_graph: Option<Graph>) -> Self
pub fn with_commit_graph(self, commit_graph: Option<Graph>) -> Self
Set or unset the commit_graph
to use for the iteration.