pub fn objects<Find>(
db: Find,
objects_ids: Box<dyn Iterator<Item = Result<ObjectId, Box<dyn Error + Send + Sync + 'static>>> + Send>,
objects: &dyn Count,
should_interrupt: &AtomicBool,
_: Options,
) -> Result<(Vec<Count>, Outcome), Error>Available on crate feature
generate only.Expand description
Generate Counts from input objects with object expansion based on options
to learn which objects would constitute a pack. This step is required to know exactly how many objects would
be in a pack while keeping data around to minimize database object access.
A Count object maintains enough state to greatly accelerate future access of packed objects.
db- the object store to use for accessing objects.objects_ids- A list of objects IDs to add to the pack. Duplication checks are performed so no object is ever added to a pack twice.
- Objects may be expanded based on the provided
options
objects- count the amount of objects we encounter
should_interrupt- A flag that is set to true if the operation should stop
options- more configuration