Struct gix_traverse::commit::topo::Builder

source ·
pub struct Builder<Find, Predicate> { /* private fields */ }
Expand description

Builder for Topo.

Implementations§

source§

impl<Find> Builder<Find, fn(_: &oid) -> bool>
where Find: Find,

source

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.

source

pub fn with_predicate<Predicate>( self, predicate: Predicate, ) -> Builder<Find, Predicate>
where Predicate: FnMut(&oid) -> bool,

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>
where Find: Find, Predicate: FnMut(&oid) -> bool,

source

pub fn sorting(self, sorting: Sorting) -> Self

Set the sorting to use for the topological walk.

source

pub fn parents(self, parents: Parents) -> Self

Specify how to handle commit parents during traversal.

source

pub fn with_commit_graph(self, commit_graph: Option<Graph>) -> Self

Set or unset the commit_graph to use for the iteration.

source

pub fn build(self) -> Result<Topo<Find, Predicate>, Error>

Build a new Topo instance.

Note that merely building an instance is currently expensive.

Auto Trait Implementations§

§

impl<Find, Predicate> Freeze for Builder<Find, Predicate>
where Find: Freeze, Predicate: Freeze,

§

impl<Find, Predicate> RefUnwindSafe for Builder<Find, Predicate>
where Find: RefUnwindSafe, Predicate: RefUnwindSafe,

§

impl<Find, Predicate> Send for Builder<Find, Predicate>
where Find: Send, Predicate: Send,

§

impl<Find, Predicate> Sync for Builder<Find, Predicate>
where Find: Sync, Predicate: Sync,

§

impl<Find, Predicate> Unpin for Builder<Find, Predicate>
where Find: Unpin, Predicate: Unpin,

§

impl<Find, Predicate> UnwindSafe for Builder<Find, Predicate>
where Find: UnwindSafe, Predicate: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.