Skip to main content

ObjectAbsorb

Trait ObjectAbsorb 

Source
pub trait ObjectAbsorb: Send + Sync {
    // Required method
    fn absorb(&self, job: IndexJob) -> Result<()>;
}
Expand description

The object-level ingress, called by the drain and by nothing else here.

The indexer knows extents; it does not know what a git object is, and it must not learn — the split is what keeps the pack grammar out of this file and the channel out of the store’s. The implementor is GitStore’s absorber, which is the same object a read falls back to, so the background path and the fallback path are one path (LAW 5).

The argument is an IndexJob — 24 bytes, Copy, no buffer. Zero-copy handoff survives the extra hop.

Required Methods§

Source

fn absorb(&self, job: IndexJob) -> Result<()>

Absorb this pack’s objects into the object-level index.

Must be idempotent for a pack already absorbed: the ack path records a pack as pending and hands it to the channel in that order, and a fast worker can arrive at either end first.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§