pub struct ReachableSet { /* private fields */ }Expand description
Reachable objects from a ReachabilityQuery: in-index bits plus out-of-namespace oids.
Implementations§
Source§impl ReachableSet
impl ReachableSet
Sourcepub fn count_by_kind(&self, kind: ObjectKind) -> Result<usize, BitmapWalkError>
pub fn count_by_kind(&self, kind: ObjectKind) -> Result<usize, BitmapWalkError>
Sourcepub fn count_by_kind_popcount(
&self,
kind: ObjectKind,
) -> Result<usize, BitmapWalkError>
pub fn count_by_kind_popcount( &self, kind: ObjectKind, ) -> Result<usize, BitmapWalkError>
Count reachable objects of kind via type-bitmap intersection popcount.
§Errors
Propagates bitmap type-index decode failures.
Sourcepub fn iter_by_kind(
&self,
kind: ObjectKind,
) -> impl Iterator<Item = ObjectId> + '_
pub fn iter_by_kind( &self, kind: ObjectKind, ) -> impl Iterator<Item = ObjectId> + '_
Iterate reachable oids of kind in ascending bitmap position order, then extended oids sorted.
Sourcepub fn object_ids(&self) -> HashSet<ObjectId>
pub fn object_ids(&self) -> HashSet<ObjectId>
All reachable object ids (indexed namespace and extended) as a set.
Sourcepub fn bitmap_index(&self) -> &Arc<BitmapIndex> ⓘ
pub fn bitmap_index(&self) -> &Arc<BitmapIndex> ⓘ
Bitmap index backing this set (pack or MIDX namespace).
Sourcepub fn extended_objects(&self) -> &[(ObjectId, ObjectKind)]
pub fn extended_objects(&self) -> &[(ObjectId, ObjectKind)]
Loose / out-of-namespace objects included in this set.
Sourcepub fn iter_grouped_by_kind(&self) -> impl Iterator<Item = ObjectId> + '_
pub fn iter_grouped_by_kind(&self) -> impl Iterator<Item = ObjectId> + '_
All reachable oids grouped by Git’s bitmap output order (commits, trees, blobs, tags).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReachableSet
impl RefUnwindSafe for ReachableSet
impl Send for ReachableSet
impl Sync for ReachableSet
impl Unpin for ReachableSet
impl UnsafeUnpin for ReachableSet
impl UnwindSafe for ReachableSet
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