pub struct SpooledBody {
pub path: PathBuf,
pub size: u64,
pub md5_hex: 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: StringTrait Implementations§
Auto Trait Implementations§
impl Freeze for SpooledBody
impl RefUnwindSafe for SpooledBody
impl Send for SpooledBody
impl Sync for SpooledBody
impl Unpin for SpooledBody
impl UnsafeUnpin for SpooledBody
impl UnwindSafe for SpooledBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more