pub struct PackedObjects { /* private fields */ }Expand description
Pack-index-backed read-only ObjectStore for one objects/ directory.
Implementations§
Source§impl PackedObjects
impl PackedObjects
Sourcepub fn pack_store(&self) -> &Arc<PackStore> ⓘ
pub fn pack_store(&self) -> &Arc<PackStore> ⓘ
Shared pack cache handle (same as used for reads).
Sourcepub fn object_ids_from_index_path(idx_path: &Path) -> Result<HashSet<ObjectId>>
pub fn object_ids_from_index_path(idx_path: &Path) -> Result<HashSet<ObjectId>>
Object ids listed in a pack index file (for ingest paths outside the live ODB cache).
§Errors
Propagates pack index parse/verify failures from pack::read_pack_index.
Sourcepub fn contains_filtered(
&self,
oid: &ObjectId,
filter: PackFilter,
) -> Result<bool>
pub fn contains_filtered( &self, oid: &ObjectId, filter: PackFilter, ) -> Result<bool>
Whether oid appears in any pack index matching filter.
Used for local materialization checks (promisor/cruft exclusion); not part of
ObjectStore::contains, which ignores promisor packs.
§Errors
Propagates pack directory enumeration failures.
Sourcepub fn for_each_promisor_object(
&self,
f: &mut dyn FnMut(&ObjectId) -> ControlFlow<()>,
) -> Result<()>
pub fn for_each_promisor_object( &self, f: &mut dyn FnMut(&ObjectId) -> ControlFlow<()>, ) -> Result<()>
Invoke f for each object id stored in a promisor-marked pack index.
§Errors
Propagates pack index enumeration failures.
Sourcepub fn kept_pack_object_ids(&self) -> Result<HashSet<ObjectId>>
pub fn kept_pack_object_ids(&self) -> Result<HashSet<ObjectId>>
Collect object ids from pack indexes that have a sibling .keep file.
§Errors
Propagates pack directory or index read failures.
Sourcepub fn for_each_removable_pack_object(
&self,
f: &mut dyn FnMut(&ObjectId) -> ControlFlow<()>,
) -> Result<()>
pub fn for_each_removable_pack_object( &self, f: &mut dyn FnMut(&ObjectId) -> ControlFlow<()>, ) -> Result<()>
Invoke f for each object id in a local pack index without a sibling .keep
or .promisor file.
Used by repack when retaining unreachable storage from packs that will be removed.
§Errors
Propagates pack index enumeration failures.
Trait Implementations§
Source§impl Debug for PackedObjects
impl Debug for PackedObjects
Source§impl ObjectStore for PackedObjects
impl ObjectStore for PackedObjects
Source§fn read(&self, oid: &ObjectId) -> Result<Option<Object>>
fn read(&self, oid: &ObjectId) -> Result<Option<Object>>
Source§fn read_into(
&self,
oid: &ObjectId,
buf: &mut Vec<u8>,
) -> Result<Option<ObjectKind>>
fn read_into( &self, oid: &ObjectId, buf: &mut Vec<u8>, ) -> Result<Option<ObjectKind>>
buf, reusing its capacity when possible. Read more