Struct jj_lib::default_index::CompositeIndex
source · pub struct CompositeIndex<'a>(/* private fields */);
Expand description
Reference wrapper that provides global access to nested index segments.
Implementations§
source§impl<'a> CompositeIndex<'a>
impl<'a> CompositeIndex<'a>
pub fn num_commits(&self) -> u32
pub fn stats(&self) -> IndexStats
pub fn entry_by_pos(&self, pos: IndexPosition) -> IndexEntry<'a>
pub fn commit_id_to_pos(&self, commit_id: &CommitId) -> Option<IndexPosition>
pub fn entry_by_id(&self, commit_id: &CommitId) -> Option<IndexEntry<'a>>
pub fn walk_revs( &self, wanted: &[IndexPosition], unwanted: &[IndexPosition] ) -> RevWalk<'a> ⓘ
pub fn heads_pos( &self, candidate_positions: BTreeSet<IndexPosition> ) -> BTreeSet<IndexPosition>
Trait Implementations§
source§impl AsCompositeIndex for CompositeIndex<'_>
impl AsCompositeIndex for CompositeIndex<'_>
source§fn as_composite(&self) -> CompositeIndex<'_>
fn as_composite(&self) -> CompositeIndex<'_>
Returns reference wrapper that provides global access to this index.
source§impl<'a> Clone for CompositeIndex<'a>
impl<'a> Clone for CompositeIndex<'a>
source§fn clone(&self) -> CompositeIndex<'a>
fn clone(&self) -> CompositeIndex<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'index> IdIndexSource<IndexPosition> for CompositeIndex<'index>
impl<'index> IdIndexSource<IndexPosition> for CompositeIndex<'index>
type Entry = IndexEntry<'index>
fn entry_at(&self, pointer: &IndexPosition) -> Self::Entry
source§impl Index for CompositeIndex<'_>
impl Index for CompositeIndex<'_>
source§fn shortest_unique_commit_id_prefix_len(&self, commit_id: &CommitId) -> usize
fn shortest_unique_commit_id_prefix_len(&self, commit_id: &CommitId) -> usize
Suppose the given commit_id
exists, returns the minimum prefix length
to disambiguate it. The length to be returned is a number of hexadecimal
digits.
If the given commit_id
doesn’t exist, this will return the prefix
length that never matches with any commit ids.
source§fn topo_order(
&self,
input: &mut dyn Iterator<Item = &CommitId>
) -> Vec<CommitId>
fn topo_order( &self, input: &mut dyn Iterator<Item = &CommitId> ) -> Vec<CommitId>
Parents before children
fn resolve_commit_id_prefix( &self, prefix: &HexPrefix ) -> PrefixResolution<CommitId>
fn has_id(&self, commit_id: &CommitId) -> bool
fn is_ancestor(&self, ancestor_id: &CommitId, descendant_id: &CommitId) -> bool
fn common_ancestors( &self, set1: &[CommitId], set2: &[CommitId] ) -> Vec<CommitId>
source§fn all_heads_for_gc(
&self
) -> Result<Box<dyn Iterator<Item = CommitId> + '_>, AllHeadsForGcUnsupported>
fn all_heads_for_gc( &self ) -> Result<Box<dyn Iterator<Item = CommitId> + '_>, AllHeadsForGcUnsupported>
Heads among all indexed commits at the associated operation. Read more
fn heads( &self, candidate_ids: &mut dyn Iterator<Item = &CommitId> ) -> Vec<CommitId>
fn evaluate_revset<'index>( &'index self, expression: &ResolvedExpression, store: &Arc<Store> ) -> Result<Box<dyn Revset + 'index>, RevsetEvaluationError>
impl<'a> Copy for CompositeIndex<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CompositeIndex<'a>
impl<'a> Send for CompositeIndex<'a>
impl<'a> Sync for CompositeIndex<'a>
impl<'a> Unpin for CompositeIndex<'a>
impl<'a> !UnwindSafe for CompositeIndex<'a>
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