pub struct Sigv4<'a> {
pub method: &'a str,
pub host: &'a str,
pub canonical_uri: &'a str,
pub canonical_query: &'a str,
pub payload: &'a [u8],
pub region: &'a str,
pub service: &'a str,
pub access_key: &'a str,
pub secret_key: &'a str,
pub session_token: Option<&'a str>,
pub amz: AmzDate,
}Expand description
All inputs needed to sign one request. Pure — no IO — so it is unit tested against AWS’s published example vector.
Fields§
§method: &'a str§host: &'a str§canonical_uri: &'a strAlready URI-encoded absolute path.
canonical_query: &'a strAlready-canonical query string (sorted, encoded). Empty for none.
payload: &'a [u8]§region: &'a str§service: &'a str§access_key: &'a str§secret_key: &'a str§session_token: Option<&'a str>§amz: AmzDateImplementations§
Source§impl Sigv4<'_>
impl Sigv4<'_>
Sourcepub fn signed_headers(&self) -> Vec<(String, String)>
pub fn signed_headers(&self) -> Vec<(String, String)>
The (name, value) header pairs to attach to the outgoing request
(x-amz-date, optional x-amz-security-token, authorization).
The host header is not returned — the HTTP client sets it, and
it is folded into the signature here using self.host.
Auto Trait Implementations§
impl<'a> Freeze for Sigv4<'a>
impl<'a> RefUnwindSafe for Sigv4<'a>
impl<'a> Send for Sigv4<'a>
impl<'a> Sync for Sigv4<'a>
impl<'a> Unpin for Sigv4<'a>
impl<'a> UnsafeUnpin for Sigv4<'a>
impl<'a> UnwindSafe for Sigv4<'a>
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