pub struct Fragments(/* private fields */);Expand description
A carried-byte map into its immediate enclosing source. Unlike a standalone
document map, its parent can itself be carried or decrypted; the Source
/ Failure::origins chain identifies that domain explicitly. No method
claims that a parent-relative offset is already a physical PFX coordinate.
Implementations§
Source§impl Fragments
impl Fragments
Sourcepub fn enclosure(&self) -> Span
pub fn enclosure(&self) -> Span
Parent-relative enclosure of the complete carrying OCTET STRING TLV.
Sourcepub fn offset_in_parent(&self, at: u64, work: &impl Work) -> Result<u64>
pub fn offset_in_parent(&self, at: u64, work: &impl Work) -> Result<u64>
Maps one current source point into the immediately enclosing source. Repeat through the retained chain until Document, or stop at a Plaintext boundary, where only the ciphertext enclosure can be mapped further.
Sourcepub fn ranges_in_parent(
&self,
span: Span,
work: &impl Work,
) -> Result<OwnedVec<Span>>
pub fn ranges_in_parent( &self, span: Span, work: &impl Work, ) -> Result<OwnedVec<Span>>
Maps a current range into its actual parent fragments, without claiming a single contiguous physical range across headers or encryption.
Sourcepub fn try_copy_in(&self, work: &impl Work) -> Result<Self>
pub fn try_copy_in(&self, work: &impl Work) -> Result<Self>
Retains just this layer’s metadata for a caller-owned diagnostic/result.