pub struct S3PutOptions<'a> {
pub content_type: &'a str,
pub blake3_meta: Option<&'a str>,
pub cache_control: Option<&'a str>,
}Expand description
The per-object headers a PUT carries beyond the ones SigV4 always needs.
A struct rather than more positional arguments: sign_s3_put_object was
already at eight, two of them Option<&str>, and a third adjacent optional
string is the kind of parameter list where a swapped pair compiles and ships
the wrong header.
Fields§
§content_type: &'a strContent-Type. Empty is not valid S3 — pass the caller’s default.
blake3_meta: Option<&'a str>x-amz-meta-blake3 (R546-B10) — see sign_s3_put_object.
cache_control: Option<&'a str>Cache-Control (R703-B8). None leaves the header off entirely, which
is how every CLI-driven publish behaved before this existed: R2 then
serves the object with no directive at all, so a browser (and any future
edge-cache rule) is free to hold a mutable pointer — latest.json, a
release manifest — for as long as it likes. Versioned, content-addressed
keys want CACHE_CONTROL_IMMUTABLE; fixed-key pointers want
CACHE_CONTROL_NO_CACHE.
Trait Implementations§
Source§impl<'a> Clone for S3PutOptions<'a>
impl<'a> Clone for S3PutOptions<'a>
Source§fn clone(&self) -> S3PutOptions<'a>
fn clone(&self) -> S3PutOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more