#[non_exhaustive]pub struct SignedUrlOptions {
pub extra_query: Vec<(String, String)>,
pub signed_headers: HeaderMap,
}cloud-base only.Expand description
Additional parameters to fold into a presigned URL’s signature, used with
Signer::signed_url_opts.
All values are fixed at signing time: the recipient of the presigned URL must send exactly these query parameters and headers, with these values, for the request to be accepted.
Construct with SignedUrlOptions::default (or the builder methods) and set only the fields
you need, so that future additions remain backwards compatible:
let options = SignedUrlOptions::default()
.with_query([("partNumber", "1"), ("uploadId", "abc123")])
.with_signed_header(CONTENT_TYPE, HeaderValue::from_static("text/plain"));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.extra_query: Vec<(String, String)>Query parameters to sign and append to the URL.
Used for requests that carry signed query parameters — for example a multipart
UploadPart (partNumber, uploadId) or pinning a versionId.
signed_headers: HeaderMapRequest headers to bind to the signature.
Used to require the recipient to send specific headers, such as a checksum
(x-amz-checksum-sha256), content-type, or server-side-encryption headers.
Implementations§
Source§impl SignedUrlOptions
impl SignedUrlOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Create an empty set of options, equivalent to SignedUrlOptions::default.
Sourcepub fn with_query<I, K, V>(self, query: I) -> Self
pub fn with_query<I, K, V>(self, query: I) -> Self
Append query parameters to sign.
Sourcepub fn with_signed_header(self, name: HeaderName, value: HeaderValue) -> Self
pub fn with_signed_header(self, name: HeaderName, value: HeaderValue) -> Self
Bind a request header to the signature.
Trait Implementations§
Source§impl Clone for SignedUrlOptions
impl Clone for SignedUrlOptions
Source§fn clone(&self) -> SignedUrlOptions
fn clone(&self) -> SignedUrlOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SignedUrlOptions
impl Debug for SignedUrlOptions
Source§impl Default for SignedUrlOptions
impl Default for SignedUrlOptions
Source§fn default() -> SignedUrlOptions
fn default() -> SignedUrlOptions
Auto Trait Implementations§
impl Freeze for SignedUrlOptions
impl RefUnwindSafe for SignedUrlOptions
impl Send for SignedUrlOptions
impl Sync for SignedUrlOptions
impl Unpin for SignedUrlOptions
impl UnsafeUnpin for SignedUrlOptions
impl UnwindSafe for SignedUrlOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more