pub struct RevGraph<'repo> { /* private fields */ }Expand description
Repository-scoped revision graph helper.
Implementations§
Source§impl RevGraph<'_>
impl RevGraph<'_>
Sourcepub fn is_ancestor(
&self,
ancestor: ObjectId,
descendant: ObjectId,
) -> Result<bool>
pub fn is_ancestor( &self, ancestor: ObjectId, descendant: ObjectId, ) -> Result<bool>
Whether ancestor is reachable from descendant through parent links.
Sourcepub fn ahead_behind(
&self,
left: ObjectId,
right: ObjectId,
) -> Result<(usize, usize)>
pub fn ahead_behind( &self, left: ObjectId, right: ObjectId, ) -> Result<(usize, usize)>
Return (ahead, behind) commit counts for two commit tips.
Sourcepub fn stream_reachable_commits<I, F>(
&self,
tips: I,
options: ReachableCommitOptions,
emit: F,
) -> Result<()>
pub fn stream_reachable_commits<I, F>( &self, tips: I, options: ReachableCommitOptions, emit: F, ) -> Result<()>
Stream commits reachable from tips in the configured graph walk order.
Sourcepub fn collect_reachable_commits<I>(
&self,
tips: I,
options: ReachableCommitOptions,
) -> Result<Vec<ReachableCommit>>where
I: IntoIterator<Item = ObjectId>,
pub fn collect_reachable_commits<I>(
&self,
tips: I,
options: ReachableCommitOptions,
) -> Result<Vec<ReachableCommit>>where
I: IntoIterator<Item = ObjectId>,
Collect commits reachable from tips.
Trait Implementations§
Auto Trait Implementations§
impl<'repo> Freeze for RevGraph<'repo>
impl<'repo> RefUnwindSafe for RevGraph<'repo>
impl<'repo> Send for RevGraph<'repo>
impl<'repo> Sync for RevGraph<'repo>
impl<'repo> Unpin for RevGraph<'repo>
impl<'repo> UnsafeUnpin for RevGraph<'repo>
impl<'repo> UnwindSafe for RevGraph<'repo>
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