pub struct LinkDecoder<'scratch> { /* private fields */ }Expand description
Scan one canonical object body across arbitrary chunks. Blobs/messages are skipped without retaining them; commit parents and tag targets are emitted with their expected kinds. Tree names borrow caller scratch until resumption. Scratch is divided equally into current/previous names; other kinds need none.
This scans syntax and adjacent tree order, not complete graph validity.
Authenticate the body separately with ObjectDigest. The host MUST check
target existence/kinds and tree-name uniqueness (including file/directory
aliases separated in Git order), persist parent edges and enforce ref policy.
Gitlinks name external repositories and emit kind: None.
Historical noncanonical tree modes with recognized type bits, including zero padding and old regular-file permissions, are preserved and flagged. They are not silently rewritten or rejected as graph errors.
Implementations§
Source§impl<'scratch> LinkDecoder<'scratch>
impl<'scratch> LinkDecoder<'scratch>
pub fn new( info: ObjectInfo, format: ObjectFormat, names: &'scratch mut [u8], limits: LinkLimits, ) -> Result<Self>
pub fn position(&self) -> u64
Sourcepub fn update<'name>(
&'name mut self,
input: &[u8],
end_of_input: bool,
) -> Result<LinkProgress<'name>>
pub fn update<'name>( &'name mut self, input: &[u8], end_of_input: bool, ) -> Result<LinkProgress<'name>>
Events may consume a prefix. Resubmit the suffix with the same EOF flag. Every error is terminal; all emitted metadata remains provisional.