aws_sigv4/
sign.rs

1/*
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6//! Functions to create signing keys and calculate signatures.
7
8// macro lifted from aws-smithy-runtime-api—eventually just inline these and delete macro.
9macro_rules! builder_methods {
10    ($fn_name:ident, $arg_name:ident, $ty:ty, $doc:literal, $($tail:tt)+) => {
11        builder_methods!($fn_name, $arg_name, $ty, $doc);
12        builder_methods!($($tail)+);
13    };
14    ($fn_name:ident, $arg_name:ident, $ty:ty, $doc:literal) => {
15        #[doc = $doc]
16        pub fn $fn_name(&mut self, $arg_name: Option<$ty>) -> &mut Self {
17            self.$arg_name = $arg_name;
18            self
19        }
20
21        #[doc = $doc]
22        pub fn $arg_name(mut self, $arg_name: $ty) -> Self {
23            self.$arg_name = Some($arg_name);
24            self
25        }
26    };
27}
28
29/// Support for Sigv4 signing
30pub mod v4;
31
32/// Support for Sigv4a signing
33#[cfg(feature = "sigv4a")]
34pub mod v4a;