pub struct SpooledBody {
pub path: PathBuf,
pub size: u64,
pub md5_hex: String,
pub md5: [u8; 16],
pub trailers: Vec<(String, String)>,
}Expand description
Outcome of spooling a streaming request body to disk: the path of the
freshly created tempfile, the total byte count, and the MD5 hash of
the bytes (lowercase hex, the form S3 uses for ETag).
The caller owns the file and is responsible for either consuming it
(passing the PathBuf into a BodySource::File handed to a store)
or unlinking it. Returning the file path instead of a handle lets the
downstream store rename the file directly, which is the whole point —
in disk-mode S3 a 1 GiB upload performs zero in-RAM copies of the
payload.
Fields§
§path: PathBuf§size: u64§md5_hex: String§md5: [u8; 16]The raw MD5 digest md5_hex spells out.
trailers: Vec<(String, String)>Trailing headers that followed the payload: the aws-chunked trailer
section (e.g. x-amz-checksum-crc32:<base64>) and any HTTP/1.1 chunked
trailers. Names are lowercased, values trimmed; the trailer signature
line of a signed streaming upload is not included.