pub enum Chunk<'a> {
Metadata(&'a [u8]),
InlineData(&'a [u8]),
FileBackedData {
dirfd_index: u32,
length: u64,
filename: &'a [u8],
},
}Expand description
A chunk decoded from a splitdirfdstream.
Chunks carry either stream metadata (raw tar header/padding bytes), inline-transported file content (non-world-readable files the producer read through a privileged fd), or references to external files identified by a directory fd index and a relative filename.
Variants§
Metadata(&'a [u8])
Stream metadata: raw tar header or padding bytes embedded directly in the stream. Consumers write these verbatim into the output.
InlineData(&'a [u8])
Inline-transported file content. The producer read these bytes through
a privileged fd; the consumer decides whether to store them inline
(≤ splitstream threshold) or as an external object based on data.len().
FileBackedData
Reference to an external file relative to one of the caller-supplied directory file descriptors.
The reader does not validate filename content — callers that
consume filename directly must call validate_filename or use
open_beneath / reconstruct, which call it internally.