Skip to main content

BaseSource

Trait BaseSource 

Source
pub trait BaseSource: Sync {
    // Required method
    fn content(&self, oid: &[u8]) -> Result<Option<(GitObjectKind, Vec<u8>)>>;
}
Expand description

Where an entry that deltas against something outside the pack gets its base.

Implemented by the store, which may or may not be able to answer — see the module docs on §14.

Required Methods§

Source

fn content(&self, oid: &[u8]) -> Result<Option<(GitObjectKind, Vec<u8>)>>

The object’s type and inflated payload.

Ok(None) means this source does not hold that object — the only answer ResolveError::missing_base may be built from. Err means the source does hold it and could not read it, and that is a different fact with a different owner.

§🔴 It returned a bare Option, and the difference was thrown away

impl BaseSource for Absorber ended in .ok().flatten(): a store that failed to reconstruct a base it holds answered exactly like a store that never had it, and the resolver then refused the pushed pack with “this repository genuinely does not have that object”. MEASURED on oden 2026-08-30 (lane AI): 21 of 140 ordinary pushes refused with that sentence about an object sitting in an absorbed pack one lookup away — see MAX_DELTA_LINKS for what was actually wrong and crate::thin_storm for the red. A client cannot act on a diagnosis that names the wrong party; neither can an operator.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§