Skip to main content

write_bundle_streaming_v3

Function write_bundle_streaming_v3 

Source
pub fn write_bundle_streaming_v3<W, S, O>(
    out: W,
    created_at: u64,
    data_only: bool,
    source: SourceInfo,
    specs: Vec<MemberSpec>,
    chunk_size: usize,
    stage: S,
    open: O,
) -> Result<(), BundleError>
Expand description

Stream a v3-capable bundle to out, dispatching each member by its MemberFraming — the chunked-aware superset of write_bundle_streaming the export driver uses. For a Sidecar member, stage(spec) stages it to a bounded temp (returned path), which is appended then deleted (the inc1 O(largest-member) footprint, unchanged); for a ChunkedTrailer member, open(spec) yields a Box<dyn Read> over the member’s bytes (an engine dump stream) that is piped STRAIGHT through append_member_chunked in chunk_size pieces — NO temp, O(chunk) disk + memory. The MANIFEST is v3 iff any member is chunked (else v2 — see BundleStreamWriter::new).