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 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 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.
Auto Trait Implementations§
impl<Find, Predicate> Freeze for Builder<Find, Predicate>
impl<Find, Predicate> RefUnwindSafe for Builder<Find, Predicate>where
Find: RefUnwindSafe,
Predicate: RefUnwindSafe,
impl<Find, Predicate> Send for Builder<Find, Predicate>
impl<Find, Predicate> Sync for Builder<Find, Predicate>
impl<Find, Predicate> Unpin for Builder<Find, Predicate>
impl<Find, Predicate> UnwindSafe for Builder<Find, Predicate>where
Find: UnwindSafe,
Predicate: UnwindSafe,
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