AWS SDK

AWS SDK

rev. 595a9dbeb2bcaa5eb380ce8a3ff81a559073e046 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/Cargo.toml

@@ -2,2 +70,70 @@
   22     22   
bytes-utils = "0.1"
   23     23   
percent-encoding = "2.3.1"
   24     24   
pin-project-lite = "0.2.14"
   25     25   
pin-utils = "0.1.0"
   26     26   
tracing = "0.1.40"
   27     27   
futures-core = "0.3.31"
   28     28   
   29     29   
[dependencies.aws-smithy-eventstream]
   30     30   
path = "../aws-smithy-eventstream"
   31     31   
optional = true
   32         -
version = "0.60.8"
          32  +
version = "0.60.9"
   33     33   
   34     34   
[dependencies.aws-smithy-runtime-api]
   35     35   
path = "../aws-smithy-runtime-api"
   36     36   
features = ["client", "http-02x"]
   37         -
version = "1.8.0"
          37  +
version = "1.8.1"
   38     38   
   39     39   
[dependencies.aws-smithy-types]
   40     40   
path = "../aws-smithy-types"
   41     41   
features = ["byte-stream-poll-next", "http-body-0-4-x"]
   42         -
version = "1.3.1"
          42  +
version = "1.3.2"
   43     43   
   44     44   
[dependencies.http-02x]
   45     45   
package = "http"
   46     46   
version = "0.2.9"
   47     47   
   48     48   
[dependencies.http-1x]
   49     49   
package = "http"
   50     50   
version = "1"
   51     51   
   52     52   
[dependencies.http-body-04x]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/Cargo.toml

@@ -1,1 +21,21 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-json"
    4         -
version = "0.61.3"
           4  +
version = "0.61.4"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "John DiSanti <jdisanti@amazon.com>"]
    6      6   
description = "Token streaming JSON parser for smithy-rs."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
[dependencies.aws-smithy-types]
   16     16   
path = "../aws-smithy-types"
   17         -
version = "1.3.1"
          17  +
version = "1.3.2"
   18     18   
   19     19   
[dev-dependencies]
   20     20   
proptest = "1"
   21     21   
serde_json = "1.0"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/fuzz/Cargo.toml

@@ -1,1 +40,40 @@
   19     19   
edition = "2021"
   20     20   
   21     21   
[package.metadata]
   22     22   
cargo-fuzz = true
   23     23   
   24     24   
[dependencies]
   25     25   
libfuzzer-sys = "=0.4.7"
   26     26   
   27     27   
[dependencies.aws-smithy-json]
   28     28   
path = ".."
   29         -
version = "0.61.3"
          29  +
version = "0.61.4"
   30     30   
   31     31   
[dependencies.aws-smithy-types]
   32     32   
path = "../../aws-smithy-types"
   33         -
version = "1.3.1"
          33  +
version = "1.3.2"
   34     34   
   35     35   
[dependencies.serde_json]
   36     36   
version = "1"
   37     37   
features = ["float_roundtrip"]
   38     38   
   39     39   
[workspace]
   40     40   
members = ["."]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/src/deserialize/token.rs

@@ -57,57 +117,117 @@
   77     77   
    ValueNumber {
   78     78   
        offset: Offset,
   79     79   
        value: Number,
   80     80   
    },
   81     81   
    ValueString {
   82     82   
        offset: Offset,
   83     83   
        value: EscapedStr<'a>,
   84     84   
    },
   85     85   
}
   86     86   
   87         -
impl<'a> Token<'a> {
          87  +
impl Token<'_> {
   88     88   
    pub fn offset(&self) -> Offset {
   89     89   
        use Token::*;
   90     90   
        *match self {
   91     91   
            StartArray { offset } => offset,
   92     92   
            EndArray { offset } => offset,
   93     93   
            ObjectKey { offset, .. } => offset,
   94     94   
            StartObject { offset } => offset,
   95     95   
            EndObject { offset } => offset,
   96     96   
            ValueBool { offset, .. } => offset,
   97     97   
            ValueNull { offset } => offset,

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-mocks-experimental/Cargo.toml

@@ -1,1 +29,29 @@
   11     11   
edition = "2021"
   12     12   
license = "Apache-2.0"
   13     13   
repository = "https://github.com/smithy-lang/smithy-rs"
   14     14   
[package.metadata.docs.rs]
   15     15   
all-features = true
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   18     18   
rustdoc-args = ["--cfg", "docsrs"]
   19     19   
[dependencies.aws-smithy-types]
   20     20   
path = "../aws-smithy-types"
   21         -
version = "1.3.1"
          21  +
version = "1.3.2"
   22     22   
   23     23   
[dependencies.aws-smithy-runtime-api]
   24     24   
path = "../aws-smithy-runtime-api"
   25     25   
features = ["client", "http-02x"]
   26         -
version = "1.8.0"
          26  +
version = "1.8.1"
   27     27   
[dev-dependencies.tokio]
   28     28   
version = "1"
   29     29   
features = ["full"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-mocks/Cargo.toml

@@ -1,1 +44,44 @@
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[dependencies]
   17     17   
http = "1"
   18     18   
   19     19   
[dependencies.aws-smithy-types]
   20     20   
path = "../aws-smithy-types"
   21         -
version = "1.3.1"
          21  +
version = "1.3.2"
   22     22   
   23     23   
[dependencies.aws-smithy-runtime-api]
   24     24   
path = "../aws-smithy-runtime-api"
   25     25   
features = ["client", "http-1x"]
   26         -
version = "1.8.0"
          26  +
version = "1.8.1"
   27     27   
   28     28   
[dependencies.aws-smithy-http-client]
   29     29   
path = "../aws-smithy-http-client"
   30     30   
features = ["test-util"]
   31         -
version = "1.0.3"
          31  +
version = "1.0.5"
   32     32   
[dev-dependencies.tokio]
   33     33   
version = "1"
   34     34   
features = ["full"]
   35     35   
   36     36   
[dev-dependencies.aws-smithy-async]
   37     37   
path = "../aws-smithy-async"
   38     38   
features = ["rt-tokio"]
   39     39   
version = "1.2.5"
   40     40   
   41     41   
[dev-dependencies.aws-smithy-runtime]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability-otel/Cargo.toml

@@ -1,1 +42,42 @@
    2      2   
[[bench]]
    3      3   
name = "sync_instruments"
    4      4   
harness = false
    5      5   
    6      6   
[[bench]]
    7      7   
name = "async_instruments"
    8      8   
harness = false
    9      9   
   10     10   
[package]
   11     11   
name = "aws-smithy-observability-otel"
   12         -
version = "0.1.0"
          12  +
version = "0.1.1"
   13     13   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
   14     14   
description = "Smithy OpenTelemetry observability implementation."
   15     15   
edition = "2021"
   16     16   
license = "Apache-2.0"
   17     17   
repository = "https://github.com/awslabs/smithy-rs"
   18     18   
[package.metadata.docs.rs]
   19     19   
all-features = true
   20     20   
targets = ["x86_64-unknown-linux-gnu"]
   21     21   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   22     22   
rustdoc-args = ["--cfg", "docsrs"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability-otel/benches/async_instruments.rs

@@ -41,41 +99,99 @@
   61     61   
                measurement.record(123, Some(&attrs), None);
   62     62   
            },
   63     63   
        )
   64     64   
        .build();
   65     65   
    async_mono_counter.record(4, None, None);
   66     66   
}
   67     67   
   68     68   
fn async_instruments_benchmark(c: &mut Criterion) {
   69     69   
    #[global_allocator]
   70     70   
    static GLOBAL: &StatsAlloc<System> = &INSTRUMENTED_SYSTEM;
   71         -
    let reg = Region::new(&GLOBAL);
          71  +
    let reg = Region::new(GLOBAL);
   72     72   
   73     73   
    // Setup the Otel MeterProvider (which needs to be done inside an async runtime)
   74     74   
    // The runtime is reused later for running the bench function
   75     75   
    let runtime = tokio::runtime::Runtime::new().unwrap();
   76     76   
    let otel_mp = runtime.block_on(async {
   77     77   
        let exporter = InMemoryMetricsExporter::default();
   78     78   
        let reader = PeriodicReader::builder(exporter.clone(), Tokio).build();
   79     79   
        SdkMeterProvider::builder().with_reader(reader).build()
   80     80   
    });
   81     81   
    // Create the SDK metrics types from the OTel objects

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability-otel/benches/sync_instruments.rs

@@ -7,7 +65,65 @@
   27     27   
    ud_counter.add(-6, None, None);
   28     28   
    let histogram = dyn_sdk_meter
   29     29   
        .create_histogram("TestHistogram".to_string())
   30     30   
        .build();
   31     31   
    histogram.record(1.234, None, None);
   32     32   
}
   33     33   
   34     34   
fn sync_instruments_benchmark(c: &mut Criterion) {
   35     35   
    #[global_allocator]
   36     36   
    static GLOBAL: &StatsAlloc<System> = &INSTRUMENTED_SYSTEM;
   37         -
    let reg = Region::new(&GLOBAL);
          37  +
    let reg = Region::new(GLOBAL);
   38     38   
   39     39   
    // Setup the Otel MeterProvider (which needs to be done inside an async runtime)
   40     40   
    // The runtime is reused later for running the bench function
   41     41   
    let runtime = tokio::runtime::Runtime::new().unwrap();
   42     42   
    let otel_mp = runtime.block_on(async {
   43     43   
        let exporter = InMemoryMetricsExporter::default();
   44     44   
        let reader = PeriodicReader::builder(exporter.clone(), Tokio).build();
   45     45   
        SdkMeterProvider::builder().with_reader(reader).build()
   46     46   
    });
   47     47   
    // Create the SDK metrics types from the OTel objects

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability/Cargo.toml

@@ -1,1 +20,20 @@
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/awslabs/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
[dependencies.aws-smithy-runtime-api]
   16     16   
path = "../aws-smithy-runtime-api"
   17         -
version = "1.8.0"
          17  +
version = "1.8.1"
   18     18   
   19     19   
[dev-dependencies]
   20     20   
serial_test = "3.1.1"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-protocol-test/Cargo.toml

@@ -1,1 +0,31 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-protocol-test"
    4         -
version = "0.63.2"
           4  +
version = "0.63.4"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "A collection of library functions to validate HTTP requests against Smithy protocol tests."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[dependencies]
   17     17   
assert-json-diff = "2"
   18     18   
base64-simd = "0.8"
   19     19   
cbor-diag = "0.1.12"
   20     20   
ciborium = "0.2"
   21     21   
http = "0.2.9"
   22     22   
pretty_assertions = "1.3"
   23     23   
regex-lite = "0.1.5"
   24     24   
roxmltree = "0.14.1"
   25     25   
serde_json = "1.0.128"
   26     26   
thiserror = "2"
   27     27   
   28     28   
[dependencies.aws-smithy-runtime-api]
   29     29   
path = "../aws-smithy-runtime-api"
   30     30   
features = ["client"]
   31         -
version = "1.8.0"
          31  +
version = "1.8.1"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-protocol-test/src/lib.rs

@@ -195,195 +265,265 @@
  215    215   
    }
  216    216   
    Ok(())
  217    217   
}
  218    218   
  219    219   
mod sealed {
  220    220   
    pub trait GetNormalizedHeader {
  221    221   
        fn get_header(&self, key: &str) -> Option<String>;
  222    222   
    }
  223    223   
}
  224    224   
  225         -
impl<'a> GetNormalizedHeader for &'a Headers {
         225  +
impl GetNormalizedHeader for &Headers {
  226    226   
    fn get_header(&self, key: &str) -> Option<String> {
  227    227   
        if !self.contains_key(key) {
  228    228   
            None
  229    229   
        } else {
  230    230   
            Some(self.get_all(key).collect::<Vec<_>>().join(", "))
  231    231   
        }
  232    232   
    }
  233    233   
}
  234    234   
  235         -
impl<'a> GetNormalizedHeader for &'a HeaderMap {
         235  +
impl GetNormalizedHeader for &HeaderMap {
  236    236   
    fn get_header(&self, key: &str) -> Option<String> {
  237    237   
        if !self.contains_key(key) {
  238    238   
            None
  239    239   
        } else {
  240    240   
            Some(
  241    241   
                self.get_all(key)
  242    242   
                    .iter()
  243    243   
                    .map(|value| std::str::from_utf8(value.as_bytes()).expect("invalid utf-8"))
  244    244   
                    .collect::<Vec<_>>()
  245    245   
                    .join(", "),

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-query/Cargo.toml

@@ -1,1 +0,21 @@
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[dependencies]
   17     17   
urlencoding = "2.1"
   18     18   
   19     19   
[dependencies.aws-smithy-types]
   20     20   
path = "../aws-smithy-types"
   21         -
version = "1.3.1"
          21  +
version = "1.3.2"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/Cargo.toml

@@ -1,1 +61,61 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-runtime-api"
    4         -
version = "1.8.0"
           4  +
version = "1.8.1"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Zelda Hessler <zhessler@amazon.com>"]
    6      6   
description = "Smithy runtime types."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
[package.metadata.docs.rs]
   11     11   
all-features = true
   12     12   
targets = ["x86_64-unknown-linux-gnu"]
   13     13   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   14     14   
rustdoc-args = ["--cfg", "docsrs"]
   15     15   
   16     16   
[package.metadata.smithy-rs-release-tooling]
   17     17   
stable = true
   18     18   
   19     19   
[features]
   20     20   
default = []
   21     21   
client = []
   22     22   
http-auth = ["dep:zeroize"]
   23     23   
test-util = ["aws-smithy-types/test-util", "http-1x"]
   24     24   
http-02x = []
   25     25   
http-1x = []
   26     26   
   27     27   
[dependencies]
   28     28   
bytes = "1.10.0"
   29     29   
pin-project-lite = "0.2.14"
   30     30   
tracing = "0.1.40"
   31     31   
   32     32   
[dependencies.aws-smithy-async]
   33     33   
path = "../aws-smithy-async"
   34     34   
version = "1.2.5"
   35     35   
   36     36   
[dependencies.aws-smithy-types]
   37     37   
path = "../aws-smithy-types"
   38         -
version = "1.3.1"
          38  +
version = "1.3.2"
   39     39   
   40     40   
[dependencies.http-02x]
   41     41   
package = "http"
   42     42   
version = "0.2.9"
   43     43   
   44     44   
[dependencies.http-1x]
   45     45   
package = "http"
   46     46   
version = "1"
   47     47   
   48     48   
[dependencies.tokio]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/src/client/interceptors/context/wrappers.rs

@@ -22,22 +373,373 @@
   42     42   
/// Interceptor context for the `read_before_execution` and `read_before_serialization` hooks.
   43     43   
///
   44     44   
/// Only the input is available at this point in the operation.
   45     45   
#[derive(Debug)]
   46     46   
pub struct BeforeSerializationInterceptorContextRef<'a, I = Input, O = Output, E = Error> {
   47     47   
    inner: &'a InterceptorContext<I, O, E>,
   48     48   
}
   49     49   
   50     50   
impl_from_interceptor_context!(ref BeforeSerializationInterceptorContextRef);
   51     51   
   52         -
impl<'a, I, O, E> BeforeSerializationInterceptorContextRef<'a, I, O, E> {
          52  +
impl<I, O, E> BeforeSerializationInterceptorContextRef<'_, I, O, E> {
   53     53   
    /// Returns a reference to the input.
   54     54   
    pub fn input(&self) -> &I {
   55     55   
        expect!(self, input)
   56     56   
    }
   57     57   
   58     58   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
   59     59   
    ///
   60     60   
    /// There's no good reason to use this unless you're writing tests or you have to
   61     61   
    /// interact with an API that doesn't support the context wrapper structs.
   62     62   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
   63     63   
        self.inner
   64     64   
    }
   65     65   
}
   66     66   
   67     67   
//
   68     68   
// BeforeSerializationInterceptorContextMut
   69     69   
//
   70     70   
   71     71   
/// Interceptor context for the `modify_before_serialization` hook.
   72     72   
///
   73     73   
/// Only the input is available at this point in the operation.
   74     74   
#[derive(Debug)]
   75     75   
pub struct BeforeSerializationInterceptorContextMut<'a, I = Input, O = Output, E = Error> {
   76     76   
    inner: &'a mut InterceptorContext<I, O, E>,
   77     77   
}
   78     78   
   79     79   
impl_from_interceptor_context!(mut BeforeSerializationInterceptorContextMut);
   80     80   
   81         -
impl<'a, I, O, E> BeforeSerializationInterceptorContextMut<'a, I, O, E> {
          81  +
impl<I, O, E> BeforeSerializationInterceptorContextMut<'_, I, O, E> {
   82     82   
    /// Returns a reference to the input.
   83     83   
    pub fn input(&self) -> &I {
   84     84   
        expect!(self, input)
   85     85   
    }
   86     86   
   87     87   
    /// Returns a mutable reference to the input.
   88     88   
    pub fn input_mut(&mut self) -> &mut I {
   89     89   
        expect!(self, input_mut)
   90     90   
    }
   91     91   
   92     92   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
   93     93   
    ///
   94     94   
    /// There's no good reason to use this unless you're writing tests or you have to
   95     95   
    /// interact with an API that doesn't support the context wrapper structs.
   96     96   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
   97     97   
        self.inner
   98     98   
    }
   99     99   
  100    100   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  101    101   
    ///
  102    102   
    /// There's no good reason to use this unless you're writing tests or you have to
  103    103   
    /// interact with an API that doesn't support the context wrapper structs.
  104    104   
    pub fn inner_mut(&mut self) -> &'_ mut InterceptorContext<I, O, E> {
  105    105   
        self.inner
  106    106   
    }
  107    107   
}
  108    108   
  109    109   
//
  110    110   
// BeforeSerializationInterceptorContextRef
  111    111   
//
  112    112   
  113    113   
/// Interceptor context for several hooks in between serialization and transmission.
  114    114   
///
  115    115   
/// Only the request is available at this point in the operation.
  116    116   
#[derive(Debug)]
  117    117   
pub struct BeforeTransmitInterceptorContextRef<'a, I = Input, O = Output, E = Error> {
  118    118   
    inner: &'a InterceptorContext<I, O, E>,
  119    119   
}
  120    120   
  121    121   
impl_from_interceptor_context!(ref BeforeTransmitInterceptorContextRef);
  122    122   
  123         -
impl<'a, I, O, E> BeforeTransmitInterceptorContextRef<'a, I, O, E> {
         123  +
impl<I, O, E> BeforeTransmitInterceptorContextRef<'_, I, O, E> {
  124    124   
    /// Returns a reference to the transmittable request for the operation being invoked.
  125    125   
    pub fn request(&self) -> &Request {
  126    126   
        expect!(self, request)
  127    127   
    }
  128    128   
  129    129   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  130    130   
    ///
  131    131   
    /// There's no good reason to use this unless you're writing tests or you have to
  132    132   
    /// interact with an API that doesn't support the context wrapper structs.
  133    133   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
  134    134   
        self.inner
  135    135   
    }
  136    136   
}
  137    137   
  138    138   
//
  139    139   
// BeforeSerializationInterceptorContextMut
  140    140   
//
  141    141   
  142    142   
/// Interceptor context for several hooks in between serialization and transmission.
  143    143   
///
  144    144   
/// Only the request is available at this point in the operation.
  145    145   
#[derive(Debug)]
  146    146   
pub struct BeforeTransmitInterceptorContextMut<'a, I = Input, O = Output, E = Error> {
  147    147   
    inner: &'a mut InterceptorContext<I, O, E>,
  148    148   
}
  149    149   
  150    150   
impl_from_interceptor_context!(mut BeforeTransmitInterceptorContextMut);
  151    151   
  152         -
impl<'a, I, O, E> BeforeTransmitInterceptorContextMut<'a, I, O, E> {
         152  +
impl<I, O, E> BeforeTransmitInterceptorContextMut<'_, I, O, E> {
  153    153   
    /// Returns a reference to the transmittable request for the operation being invoked.
  154    154   
    pub fn request(&self) -> &Request {
  155    155   
        expect!(self, request)
  156    156   
    }
  157    157   
  158    158   
    /// Returns a mutable reference to the transmittable request for the operation being invoked.
  159    159   
    pub fn request_mut(&mut self) -> &mut Request {
  160    160   
        expect!(self, request_mut)
  161    161   
    }
  162    162   
  163    163   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  164    164   
    ///
  165    165   
    /// There's no good reason to use this unless you're writing tests or you have to
  166    166   
    /// interact with an API that doesn't support the context wrapper structs.
  167    167   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
  168    168   
        self.inner
  169    169   
    }
  170    170   
  171    171   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  172    172   
    ///
  173    173   
    /// There's no good reason to use this unless you're writing tests or you have to
  174    174   
    /// interact with an API that doesn't support the context wrapper structs.
  175    175   
    pub fn inner_mut(&mut self) -> &'_ mut InterceptorContext<I, O, E> {
  176    176   
        self.inner
  177    177   
    }
  178    178   
}
  179    179   
  180    180   
//
  181    181   
// BeforeDeserializationInterceptorContextRef
  182    182   
//
  183    183   
  184    184   
/// Interceptor context for hooks before deserializing the response.
  185    185   
///
  186    186   
/// Only the response is available at this point in the operation.
  187    187   
#[derive(Debug)]
  188    188   
pub struct BeforeDeserializationInterceptorContextRef<'a, I = Input, O = Output, E = Error> {
  189    189   
    inner: &'a InterceptorContext<I, O, E>,
  190    190   
}
  191    191   
  192    192   
impl_from_interceptor_context!(ref BeforeDeserializationInterceptorContextRef);
  193    193   
  194         -
impl<'a, I, O, E> BeforeDeserializationInterceptorContextRef<'a, I, O, E> {
         194  +
impl<I, O, E> BeforeDeserializationInterceptorContextRef<'_, I, O, E> {
  195    195   
    /// Returns a reference to the response.
  196    196   
    pub fn response(&self) -> &Response {
  197    197   
        expect!(self, response)
  198    198   
    }
  199    199   
  200    200   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  201    201   
    ///
  202    202   
    /// There's no good reason to use this unless you're writing tests or you have to
  203    203   
    /// interact with an API that doesn't support the context wrapper structs.
  204    204   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
  205    205   
        self.inner
  206    206   
    }
  207    207   
}
  208    208   
  209    209   
//
  210    210   
// BeforeDeserializationInterceptorContextMut
  211    211   
//
  212    212   
  213    213   
/// Interceptor context for hooks before deserializing the response.
  214    214   
///
  215    215   
/// Only the response is available at this point in the operation.
  216    216   
pub struct BeforeDeserializationInterceptorContextMut<'a, I = Input, O = Output, E = Error> {
  217    217   
    inner: &'a mut InterceptorContext<I, O, E>,
  218    218   
}
  219    219   
  220    220   
impl_from_interceptor_context!(mut BeforeDeserializationInterceptorContextMut);
  221    221   
  222         -
impl<'a, I, O, E> BeforeDeserializationInterceptorContextMut<'a, I, O, E> {
         222  +
impl<I, O, E> BeforeDeserializationInterceptorContextMut<'_, I, O, E> {
  223    223   
    /// Returns a reference to the response.
  224    224   
    pub fn response(&self) -> &Response {
  225    225   
        expect!(self, response)
  226    226   
    }
  227    227   
  228    228   
    /// Returns a mutable reference to the response.
  229    229   
    pub fn response_mut(&mut self) -> &mut Response {
  230    230   
        expect!(self, response_mut)
  231    231   
    }
  232    232   
  233    233   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  234    234   
    ///
  235    235   
    /// There's no good reason to use this unless you're writing tests or you have to
  236    236   
    /// interact with an API that doesn't support the context wrapper structs.
  237    237   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
  238    238   
        self.inner
  239    239   
    }
  240    240   
  241    241   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  242    242   
    ///
  243    243   
    /// There's no good reason to use this unless you're writing tests or you have to
  244    244   
    /// interact with an API that doesn't support the context wrapper structs.
  245    245   
    pub fn inner_mut(&mut self) -> &'_ mut InterceptorContext<I, O, E> {
  246    246   
        self.inner
  247    247   
    }
  248    248   
}
  249    249   
  250    250   
//
  251    251   
// AfterDeserializationInterceptorContextRef
  252    252   
//
  253    253   
  254    254   
/// Interceptor context for hooks after deserializing the response.
  255    255   
///
  256    256   
/// The response and the deserialized output or error are available at this point in the operation.
  257    257   
pub struct AfterDeserializationInterceptorContextRef<'a, I = Input, O = Output, E = Error> {
  258    258   
    inner: &'a InterceptorContext<I, O, E>,
  259    259   
}
  260    260   
  261    261   
impl_from_interceptor_context!(ref AfterDeserializationInterceptorContextRef);
  262    262   
  263         -
impl<'a, I, O, E> AfterDeserializationInterceptorContextRef<'a, I, O, E> {
         263  +
impl<I, O, E> AfterDeserializationInterceptorContextRef<'_, I, O, E> {
  264    264   
    /// Returns a reference to the response.
  265    265   
    pub fn response(&self) -> &Response {
  266    266   
        expect!(self, response)
  267    267   
    }
  268    268   
  269    269   
    /// Returns a reference to the deserialized output or error.
  270    270   
    pub fn output_or_error(&self) -> Result<&O, &OrchestratorError<E>> {
  271    271   
        expect!(self, output_or_error)
  272    272   
    }
  273    273   
  274    274   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  275    275   
    ///
  276    276   
    /// There's no good reason to use this unless you're writing tests or you have to
  277    277   
    /// interact with an API that doesn't support the context wrapper structs.
  278    278   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
  279    279   
        self.inner
  280    280   
    }
  281    281   
}
  282    282   
  283    283   
//
  284    284   
// FinalizerInterceptorContextRef
  285    285   
//
  286    286   
  287    287   
/// Interceptor context for finalization hooks.
  288    288   
///
  289    289   
/// This context is used by the `read_after_attempt` and `read_after_execution` hooks
  290    290   
/// that are all called upon both success and failure, and may have varying levels
  291    291   
/// of context available depending on where a failure occurred if the operation failed.
  292    292   
pub struct FinalizerInterceptorContextRef<'a, I = Input, O = Output, E = Error> {
  293    293   
    inner: &'a InterceptorContext<I, O, E>,
  294    294   
}
  295    295   
  296    296   
impl_from_interceptor_context!(ref FinalizerInterceptorContextRef);
  297    297   
  298         -
impl<'a, I, O, E> FinalizerInterceptorContextRef<'a, I, O, E> {
         298  +
impl<I, O, E> FinalizerInterceptorContextRef<'_, I, O, E> {
  299    299   
    /// Returns the operation input.
  300    300   
    pub fn input(&self) -> Option<&I> {
  301    301   
        self.inner.input.as_ref()
  302    302   
    }
  303    303   
  304    304   
    /// Returns the serialized request.
  305    305   
    pub fn request(&self) -> Option<&Request> {
  306    306   
        self.inner.request.as_ref()
  307    307   
    }
  308    308   
  309    309   
    /// Returns the raw response.
  310    310   
    pub fn response(&self) -> Option<&Response> {
  311    311   
        self.inner.response.as_ref()
  312    312   
    }
  313    313   
  314    314   
    /// Returns the deserialized operation output or error.
  315    315   
    pub fn output_or_error(&self) -> Option<Result<&O, &OrchestratorError<E>>> {
  316    316   
        self.inner.output_or_error.as_ref().map(|o| o.as_ref())
  317    317   
    }
  318    318   
  319    319   
    /// Downgrade this wrapper struct, returning the underlying InterceptorContext.
  320    320   
    ///
  321    321   
    /// There's no good reason to use this unless you're writing tests or you have to
  322    322   
    /// interact with an API that doesn't support the context wrapper structs.
  323    323   
    pub fn inner(&self) -> &'_ InterceptorContext<I, O, E> {
  324    324   
        self.inner
  325    325   
    }
  326    326   
}
  327    327   
  328    328   
//
  329    329   
// FinalizerInterceptorContextMut
  330    330   
//
  331    331   
  332    332   
/// Interceptor context for finalization hooks.
  333    333   
///
  334    334   
/// This context is used by the `modify_before_attempt_completion` and `modify_before_completion` hooks
  335    335   
/// that are all called upon both success and failure, and may have varying levels
  336    336   
/// of context available depending on where a failure occurred if the operation failed.
  337    337   
pub struct FinalizerInterceptorContextMut<'a, I = Input, O = Output, E = Error> {
  338    338   
    inner: &'a mut InterceptorContext<I, O, E>,
  339    339   
}
  340    340   
  341    341   
impl_from_interceptor_context!(mut FinalizerInterceptorContextMut);
  342    342   
  343         -
impl<'a, I, O, E> FinalizerInterceptorContextMut<'a, I, O, E> {
         343  +
impl<I, O, E> FinalizerInterceptorContextMut<'_, I, O, E> {
  344    344   
    /// Returns the operation input.
  345    345   
    pub fn input(&self) -> Option<&I> {
  346    346   
        self.inner.input.as_ref()
  347    347   
    }
  348    348   
  349    349   
    /// Returns the serialized request.
  350    350   
    pub fn request(&self) -> Option<&Request> {
  351    351   
        self.inner.request.as_ref()
  352    352   
    }
  353    353   

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime-api/src/client/retries/classifiers.rs

@@ -404,404 +497,497 @@
  424    424   
    }
  425    425   
  426    426   
    #[test]
  427    427   
    fn test_shared_classifier_run_before() {
  428    428   
        // Ensure low-priority classifiers run *before* high-priority classifiers,
  429    429   
        // even after wrapping.
  430    430   
        let high_priority_classifier = RetryClassifierPriority::default();
  431    431   
        let mid_priority_classifier = RetryClassifierPriority::run_before(high_priority_classifier);
  432    432   
        let low_priority_classifier = RetryClassifierPriority::run_before(mid_priority_classifier);
  433    433   
  434         -
        let mut list = vec![
         434  +
        let mut list = [
  435    435   
            wrap("mid", mid_priority_classifier),
  436    436   
            wrap("high", high_priority_classifier),
  437    437   
            wrap("low", low_priority_classifier),
  438    438   
        ];
  439    439   
        list.sort_by_key(|rc| rc.priority());
  440    440   
  441    441   
        let actual: Vec<_> = list.iter().map(|it| it.name()).collect();
  442    442   
        assert_eq!(vec!["low", "mid", "high"], actual);
  443    443   
    }
  444    444   
  445    445   
    #[test]
  446    446   
    fn test_shared_classifier_run_after() {
  447    447   
        // Ensure high-priority classifiers run *after* low-priority classifiers,
  448    448   
        // even after wrapping.
  449    449   
        let low_priority_classifier = RetryClassifierPriority::default();
  450    450   
        let mid_priority_classifier = RetryClassifierPriority::run_after(low_priority_classifier);
  451    451   
        let high_priority_classifier = RetryClassifierPriority::run_after(mid_priority_classifier);
  452    452   
  453         -
        let mut list = vec![
         453  +
        let mut list = [
  454    454   
            wrap("mid", mid_priority_classifier),
  455    455   
            wrap("high", high_priority_classifier),
  456    456   
            wrap("low", low_priority_classifier),
  457    457   
        ];
  458    458   
        list.sort_by_key(|rc| rc.priority());
  459    459   
  460    460   
        let actual: Vec<_> = list.iter().map(|it| it.name()).collect();
  461    461   
        assert_eq!(vec!["low", "mid", "high"], actual);
  462    462   
    }
  463    463   
  464    464   
    #[test]
  465    465   
    fn test_shared_preset_priorities() {
  466    466   
        let before_modeled_as_retryable = RetryClassifierPriority::run_before(
  467    467   
            RetryClassifierPriority::modeled_as_retryable_classifier(),
  468    468   
        );
  469         -
        let mut list = vec![
         469  +
        let mut list = [
  470    470   
            wrap(
  471    471   
                "modeled as retryable",
  472    472   
                RetryClassifierPriority::modeled_as_retryable_classifier(),
  473    473   
            ),
  474    474   
            wrap(
  475    475   
                "http status code",
  476    476   
                RetryClassifierPriority::http_status_code_classifier(),
  477    477   
            ),
  478    478   
            wrap(
  479    479   
                "transient error",