id stringlengths 22 133 | text stringlengths 40 40.2k | arch stringclasses 1
value | syntax stringclasses 1
value | kind stringclasses 4
values | repo stringclasses 27
values | path stringlengths 5 116 | license stringclasses 6
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 16
values | source_url stringlengths 85 196 | line_start int64 1 4.28k | line_end int64 4 4.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:12 | and [`InterceptorContext::output_or_error`](context::InterceptorContext::output_or_error)
are **ALWAYS** available. In the event of retries, the `InterceptorContext` will not include changes made
in previous attempts (e.g. by request signers or other interceptors).
**Error Behavior:** If errors... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | ce28848a2f73a8ba0c4b526135983ce8ef19255e | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ce28848a2f73a8ba0c4b526135983ce8ef19255e/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:14 | /// output message or error matching the currently - executing
/// operation.
///
/// **When:** This will **ALWAYS** be called once per execution.
///
/// **Available Information:**
/// The [`InterceptorContext::input`](context::InterceptorContext::input),
/// [`InterceptorContext::request`]... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | ce28848a2f73a8ba0c4b526135983ce8ef19255e | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ce28848a2f73a8ba0c4b526135983ce8ef19255e/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:15 | /// [`InterceptorContext::request`](context::InterceptorContext::request),
/// [`InterceptorContext::response`](context::InterceptorContext::response), or
/// [`InterceptorContext::output_or_error`](context::InterceptorContext::output_or_error) **MAY** be available.
/// If the operation succeeded, the `outp... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | ce28848a2f73a8ba0c4b526135983ce8ef19255e | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ce28848a2f73a8ba0c4b526135983ce8ef19255e/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:16 | impl SharedInterceptor {
/// Create a new `SharedInterceptor` from `Interceptor`.
pub fn new<T: Interceptor + 'static>(interceptor: T) -> Self {
Self {
interceptor: Arc::new(interceptor),
check_enabled: Arc::new(|conf: &ConfigBag| {
conf.load::<DisableInterceptor<... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | ce28848a2f73a8ba0c4b526135983ce8ef19255e | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ce28848a2f73a8ba0c4b526135983ce8ef19255e/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 601 | 655 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:17 | impl<T> Storable for DisableInterceptor<T>
where
T: fmt::Debug + Send + Sync + 'static,
{
type Storer = StoreReplace<Self>;
}
/// Disable an interceptor with a given cause
pub fn disable_interceptor<T: Interceptor>(cause: &'static str) -> DisableInterceptor<T> {
DisableInterceptor {
_t: PhantomData... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | ce28848a2f73a8ba0c4b526135983ce8ef19255e | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ce28848a2f73a8ba0c4b526135983ce8ef19255e/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 641 | 655 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
//! Interceptors for clients.
//!
//! Interceptors are operation lifecycle hooks that can read/modify requests and responses.
use crate::box_error::BoxError;
use crate::client::interceptors::context::{
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:2 | let _ctx = context;
let _rc = runtime_components;
let _cfg = cfg;
Ok(())
}
};
(mut $name:ident, $phase:ident, $docs:tt) => {
#[doc = $docs]
fn $name(
&self,
context: &mut $phase<'_>,
runtime_components: &RuntimeCompo... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:3 | /// **Available Information:** The [InterceptorContext::input()] is
/// **ALWAYS** available. Other information **WILL NOT** be available.
///
/// **Error Behavior:** Errors raised by this hook will be stored
/// until all interceptors have had their `before_execution` invoked.
/// Other hooks will ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 81 | 140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:4 | **Return Constraints:** The input message returned by this hook
MUST be the same type of input message passed into this hook.
If not, an error will immediately be raised.
"
);
interceptor_trait_fn!(
read_before_serialization,
BeforeSerializationInterceptorContextRef,
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:5 | ///
/// **Available Information:** The [InterceptorContext::input()]
/// and [InterceptorContext::request()] are **ALWAYS** available.
/// Other information **WILL NOT** be available.
///
/// **Error Behavior:** If errors are raised by this hook,
/// execution will jump t... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:6 | **When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier in the request pipeline. This method will be
called multiple times in the event of retries.
**Available Information:** The [InterceptorContext::input()]
and [InterceptorContext::request()] ar... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:7 | **Error Behavior:** If errors are raised by this
hook, execution will jump to `modify_before_attempt_completion` with
the raised error as the [InterceptorContext::output_or_error()].
**Return Constraints:** The transport request message returned by this
hook MUST be the same type of req... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 241 | 300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:8 | A hook called after the transport request message is signed.
**When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier in the request pipeline. This method may be
called multiple times in the event of retries. The duration between
invocation of this... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 281 | 340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:9 | **Error Behavior:** If errors are raised by this
hook, execution will jump to `modify_before_attempt_completion` with
the raised error as the [InterceptorContext::output_or_error()].
**Return Constraints:** The transport request message returned by this
hook MUST be the same type of req... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:10 | interceptor_trait_fn!(
read_after_transmit,
BeforeDeserializationInterceptorContextRef,
"
A hook called after the transport request message is sent to the
service and a transport response message is received.
**When:** This will **ALWAYS** be called once per attempt, exc... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:11 | **Available Information:** The [InterceptorContext::input()],
[InterceptorContext::request()] and
[InterceptorContext::response()] are **ALWAYS** available.
The transmit_response may have been modified by earlier
`modify_before_deserialization` hooks, and may be modified further by
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:12 | **Error Behavior:** If errors are raised by this
hook, execution will jump to `modify_before_attempt_completion`
with the raised error as the [InterceptorContext::output_or_error()].
"
);
interceptor_trait_fn!(
read_after_deserialization,
AfterDeserializationInterceptorC... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:13 | /// be called multiple times in the event of retries.
///
/// **Available Information:** The [InterceptorContext::input()],
/// [InterceptorContext::request()],
/// [InterceptorContext::response()] and
/// [InterceptorContext::output_or_error()] are **ALWAYS** available. In the event
/// of retr... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:14 | /// interceptors).
///
/// **Error Behavior:** Errors raised by this hook will be stored
/// until all interceptors have had their `after_attempt` invoked.
/// If multiple `after_execution` methods raise errors, the latest
/// will be used and earlier ones will be logged and dropped. If the
/// ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:15 | /// hook MUST match the operation being invoked. Any error type can be
/// returned , replacing the response currently in the context.
fn modify_before_completion(
&self,
context: &mut FinalizerInterceptorContextMut<'_>,
runtime_components: &RuntimeComponents,
cfg: &mut ConfigBag... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:16 | let _cfg = cfg;
Ok(())
}
}
/// Interceptor wrapper that may be shared
#[derive(Clone)]
pub struct SharedInterceptor {
interceptor: Arc<dyn Interceptor + Send + Sync>,
check_enabled: Arc<dyn Fn(&ConfigBag) -> bool + Send + Sync>,
}
impl fmt::Debug for SharedInterceptor {
fn fmt(&self, f: &mut f... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:17 | }
impl Deref for SharedInterceptor {
type Target = Arc<dyn Interceptor + Send + Sync>;
fn deref(&self) -> &Self::Target {
&self.interceptor
}
}
/// A interceptor wrapper to conditionally enable the interceptor based on [`DisableInterceptor`]
struct ConditionallyEnabledInterceptor(SharedInterceptor... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:18 | let mut ctx = ctx.into();
for interceptor in self.into_iter() {
if let Some(interceptor) = interceptor.if_enabled(cfg) {
if let Err(new_error) =
interceptor.$interceptor(&mut ctx, runtime_components, cfg)
{
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:19 | /// Generalized interceptor disabling interface
///
/// RuntimePlugins can disable interceptors by inserting [`DisableInterceptor<T>`](DisableInterceptor) into the config bag
#[must_use]
#[derive(Debug)]
pub struct DisableInterceptor<T> {
_t: PhantomData<T>,
#[allow(unused)]
cause: &'static str,
}
impl<T> ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:20 | self,
operation: bool,
ctx: &InterceptorContext<Input, Output, Error>,
cfg: &mut ConfigBag,
) -> Result<(), InterceptorError> {
tracing::trace!(
"running {} `read_before_execution` interceptors",
if operation { "operation" } else { "client" }
);
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:21 | self,
ctx: &mut InterceptorContext<Input, Output, Error>,
runtime_components: &RuntimeComponents,
cfg: &mut ConfigBag,
) -> Result<(), InterceptorError> {
tracing::trace!("running `modify_before_attempt_completion` interceptors");
let mut result: Result<(), BoxError> = Ok(())... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:22 | result = Err(new_error);
}
}
}
result.map_err(InterceptorError::read_after_attempt)
}
pub fn modify_before_completion(
self,
ctx: &mut InterceptorContext<Input, Output, Error>,
runtime_components: &RuntimeComponents,
cfg: &mut ConfigBa... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:23 | for interceptor in self.into_iter() {
if let Some(interceptor) = interceptor.if_enabled(cfg) {
if let Err(new_error) =
interceptor.read_after_execution(&ctx, runtime_components, cfg)
{
if let Err(last_error) = result {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:24 | ) -> Result<(), BoxError> {
Err("boom".into())
}
}
let rc = RuntimeComponentsBuilder::for_tests()
.with_interceptor(SharedInterceptor::new(PanicInterceptor))
.with_interceptor(SharedInterceptor::new(TestInterceptor))
.build()
.u... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/fa5105e87e62527c549dd0c0d27fec0ab0fe0aa9/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 921 | 958 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use crate::box_error::BoxError;
use crate::client::interceptors::context::{
AfterDeserializationInterceptorContextRef, BeforeDeserializationInterceptorContextMut,
BeforeDeserializationInterceptor... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:2 | }
};
(mut $name:ident, $phase:ident, $docs:tt) => {
#[doc = $docs]
fn $name(
&self,
context: &mut $phase<'_>,
runtime_components: &RuntimeComponents,
cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
let _ctx = context;
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:3 | /// until all interceptors have had their `before_execution` invoked.
/// Other hooks will then be skipped and execution will jump to
/// `modify_before_completion` with the raised error as the
/// [InterceptorContext::output_or_error()]. If multiple
/// `before_execution` methods raise errors, the late... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 81 | 140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:4 | "
);
interceptor_trait_fn!(
read_before_serialization,
BeforeSerializationInterceptorContextRef,
"
A hook called before the input message is marshalled
into a transport
message.
**When:** This will **ALWAYS** be called once per execution, except when a
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:5 | ///
/// **Error Behavior:** If errors are raised by this hook,
/// execution will jump to `modify_before_completion` with the raised
/// error as the [InterceptorContext::output_or_error()].
"
);
interceptor_trait_fn!(
mut modify_before_retry_loop,
BeforeTransmit... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:6 | **Available Information:** The [InterceptorContext::input()]
and [InterceptorContext::request()] are **ALWAYS** available.
Other information **WILL NOT** be available. In the event of retries,
the `InterceptorContext` will not include changes made in previous
attempts (e.g. by request si... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:7 | **Return Constraints:** The transport request message returned by this
hook MUST be the same type of request message passed into this hook
If not, an error will immediately be raised.
"
);
interceptor_trait_fn!(
read_before_signing,
BeforeTransmitInterceptorContextRef,
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 241 | 300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:8 | called multiple times in the event of retries. The duration between
invocation of this hook and `before_signing` is very close to
the amount of time spent signing the request.
**Available Information:** The [InterceptorContext::input()]
and [InterceptorContext::request()] are **ALWAYS**... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 281 | 340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:9 | **Return Constraints:** The transport request message returned by this
hook MUST be the same type of request message passed into this hook
If not, an error will immediately be raised.
"
);
interceptor_trait_fn!(
read_before_transmit,
BeforeTransmitInterceptorContextRef,... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:10 | A hook called after the transport request message is sent to the
service and a transport response message is received.
**When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier in the request pipeline. This method may be
called multiple times in the... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:11 | `modify_before_deserialization` hooks, and may be modified further by
later hooks. Other information **WILL NOT** be available. In the event of
retries, the `InterceptorContext` will not include changes made in
previous attempts (e.g. by request signers or other interceptors).
**Error B... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:12 | "
);
interceptor_trait_fn!(
read_after_deserialization,
AfterDeserializationInterceptorContextRef,
"
A hook called after the transport response message is unmarshalled.
**When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earli... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:13 | /// [InterceptorContext::response()] and
/// [InterceptorContext::output_or_error()] are **ALWAYS** available. In the event
/// of retries, the `InterceptorContext` will not include changes made
/// in previous attempts (e.g. by request signers or other interceptors).
///
/// **Error Behavior:** If ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:14 | /// If multiple `after_execution` methods raise errors, the latest
/// will be used and earlier ones will be logged and dropped. If the
/// retry strategy determines that the execution is retryable,
/// execution will then jump to `before_attempt`. Otherwise,
/// execution will jump to `modify_before_at... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:15 | context: &mut FinalizerInterceptorContextMut<'_>,
runtime_components: &RuntimeComponents,
cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
let _ctx = context;
let _rc = runtime_components;
let _cfg = cfg;
Ok(())
}
/// A hook called when an execution is comple... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:16 | /// Interceptor wrapper that may be shared
#[derive(Clone)]
pub struct SharedInterceptor {
interceptor: Arc<dyn Interceptor + Send + Sync>,
check_enabled: Arc<dyn Fn(&ConfigBag) -> bool + Send + Sync>,
}
impl fmt::Debug for SharedInterceptor {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:17 | fn deref(&self) -> &Self::Target {
&self.interceptor
}
}
/// A interceptor wrapper to conditionally enable the interceptor based on [`DisableInterceptor`]
struct ConditionallyEnabledInterceptor(SharedInterceptor);
impl ConditionallyEnabledInterceptor {
fn if_enabled(&self, cfg: &ConfigBag) -> Option<&d... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:18 | interceptor.$interceptor(&mut ctx, runtime_components, cfg)
{
if let Err(last_error) = result {
tracing::debug!("{}", DisplayErrorContext(&*last_error));
}
result = Err(new_error);
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:19 | #[must_use]
#[derive(Debug)]
pub struct DisableInterceptor<T> {
_t: PhantomData<T>,
#[allow(unused)]
cause: &'static str,
}
impl<T> Storable for DisableInterceptor<T>
where
T: fmt::Debug + Send + Sync + 'static,
{
type Storer = StoreReplace<Self>;
}
/// Disable an interceptor with a given cause
pu... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:20 | ) -> Result<(), InterceptorError> {
tracing::trace!(
"running {} `read_before_execution` interceptors",
if operation { "operation" } else { "client" }
);
let mut result: Result<(), BoxError> = Ok(());
let ctx: BeforeSerializationInterceptorContextRef<'_> = ctx.int... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:21 | ) -> Result<(), InterceptorError> {
tracing::trace!("running `modify_before_attempt_completion` interceptors");
let mut result: Result<(), BoxError> = Ok(());
let mut ctx: FinalizerInterceptorContextMut<'_> = ctx.into();
for interceptor in self.into_iter() {
if let Some(inter... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:22 | result.map_err(InterceptorError::read_after_attempt)
}
pub fn modify_before_completion(
self,
ctx: &mut InterceptorContext<Input, Output, Error>,
runtime_components: &RuntimeComponents,
cfg: &mut ConfigBag,
) -> Result<(), InterceptorError> {
tracing::trace!("running... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:23 | {
if let Err(last_error) = result {
tracing::debug!("{}", DisplayErrorContext(&*last_error));
}
result = Err(new_error);
}
}
}
result.map_err(InterceptorError::read_after_execution)
}
}
#... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:24 | let rc = RuntimeComponentsBuilder::for_tests()
.with_interceptor(SharedInterceptor::new(PanicInterceptor))
.with_interceptor(SharedInterceptor::new(TestInterceptor))
.build()
.unwrap();
let mut cfg = ConfigBag::base();
let interceptors = Interceptors::new... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | eb5d5753cf1c50253e1e392e0010fad9319433eb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/eb5d5753cf1c50253e1e392e0010fad9319433eb/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 921 | 954 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use crate::box_error::BoxError;
use crate::client::interceptors::context::{
AfterDeserializationInterceptorContextRef, BeforeDeserializationInterceptorContextMut,
BeforeDeserializationInterceptor... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:2 | Ok(())
}
};
}
/// An interceptor allows injecting code into the SDK ’s request execution pipeline.
///
/// ## Terminology:
/// - An execution is one end-to-end invocation against an SDK client.
/// - An attempt is an attempt at performing an execution. By default executions are retried multiple
/// times... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:3 | interceptor_trait_fn!(
mut modify_before_serialization,
BeforeSerializationInterceptorContextMut,
"
A hook called before the input message is marshalled into a
transport message.
This method has the ability to modify and return a new
request message of the same ty... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 81 | 140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:4 | **Available Information:** The [InterceptorContext::input()] is
**ALWAYS** available. Other information **WILL NOT** be available.
**Error Behavior:** If errors are raised by this hook,
execution will jump to `modify_before_completion` with the raised
error as the [InterceptorContext::o... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:5 | **Available Information:** The [InterceptorContext::input()]
and [InterceptorContext::request()] are **ALWAYS** available.
Other information **WILL NOT** be available.
**Error Behavior:** If errors are raised by this hook,
execution will jump to `modify_before_completion` with the raise... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:6 | interceptor_trait_fn!(
mut modify_before_signing,
BeforeTransmitInterceptorContextMut,
"
A hook called before the transport request message is signed.
This method has the ability to modify and return a new transport
request message of the same type.
**When:** Thi... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:7 | failure occurs earlier in the request pipeline. This method may be
called multiple times in the event of retries. The duration between
invocation of this hook and `after_signing` is very close to
the amount of time spent signing the request.
**Available Information:** The [InterceptorCo... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 241 | 300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:8 | interceptor_trait_fn!(
mut modify_before_transmit,
BeforeTransmitInterceptorContextMut,
"
/// A hook called before the transport request message is sent to the
/// service. This method has the ability to modify and return
/// a new transport request message of the same ty... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 281 | 340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:9 | **When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier in the request pipeline. This method may be
called multiple times in the event of retries. The duration between
invocation of this hook and `after_transmit` is very close to
the amount of time... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:10 | the `InterceptorContext` will not include changes made in previous
attempts (e.g. by request signers or other interceptors).
**Error Behavior:** If errors are raised by this
hook, execution will jump to `modify_before_attempt_completion` with
the raised error as the [InterceptorContext:... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:11 | interceptor_trait_fn!(
read_before_deserialization,
BeforeDeserializationInterceptorContextRef,
"
A hook called before the transport response message is unmarshalled
**When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier in the re... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:12 | the response data.
**Available Information:** The [InterceptorContext::input()],
[InterceptorContext::request()],
[InterceptorContext::response()] and
[InterceptorContext::output_or_error()] are **ALWAYS** available. In the event
of retries, the `InterceptorContext` will not inc... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:13 | cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
let _ctx = context;
let _cfg = cfg;
Ok(())
}
/// A hook called when an attempt is completed.
///
/// **When:** This will **ALWAYS** be called once per attempt, as long as
/// `before_attempt` has been executed.
///
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:14 | /// This method has the ability to modify and return a new
/// output message or error matching the currently - executing
/// operation.
///
/// **When:** This will **ALWAYS** be called once per execution.
///
/// **Available Information:** The [InterceptorContext::input()]
/// and [Intercep... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:15 | ///
/// **Error Behavior:** Errors raised by this hook will be stored
/// until all interceptors have had their `after_execution` invoked.
/// The error will then be treated as the
/// [InterceptorContext::output_or_error()] to the customer. If multiple
/// `after_execution` methods raise errors , t... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:16 | }),
}
}
fn enabled(&self, conf: &ConfigBag) -> bool {
(self.check_enabled)(conf)
}
}
/// A interceptor wrapper to conditionally enable the interceptor based on [`DisableInterceptor`]
struct ConditionallyEnabledInterceptor<'a>(&'a SharedInterceptor);
impl ConditionallyEnabledInterceptor<'_>... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:17 | pub struct InterceptorRegistrar {
interceptors: Vec<SharedInterceptor>,
}
impl InterceptorRegistrar {
/// Register an interceptor with this `InterceptorRegistrar`.
///
/// When this `InterceptorRegistrar` is passed to an orchestrator, the orchestrator will run the
/// registered interceptor for all... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:18 | let mut result: Result<(), BoxError> = Ok(());
let mut ctx = ctx.into();
for interceptor in self.interceptors() {
if let Some(interceptor) = interceptor.if_enabled(cfg) {
if let Err(new_error) = interceptor.$interceptor(&mut ctx, cfg) {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:19 | /// RuntimePlugins can disable interceptors by inserting [`DisableInterceptor<T>`](DisableInterceptor) into the config bag
#[must_use]
#[derive(Debug)]
pub struct DisableInterceptor<T> {
_t: PhantomData<T>,
#[allow(unused)]
cause: &'static str,
}
impl<T> Storable for DisableInterceptor<T>
where
T: fmt:... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:20 | fn operation_interceptors(&self) -> impl Iterator<Item = ConditionallyEnabledInterceptor<'_>> {
self.operation_interceptors
.interceptors
.iter()
.map(ConditionallyEnabledInterceptor)
}
pub fn client_interceptors_mut(&mut self) -> &mut InterceptorRegistrar {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:21 | cfg: &mut ConfigBag,
) -> Result<(), InterceptorError> {
tracing::trace!("running `operation_read_before_execution` interceptors");
let mut result: Result<(), BoxError> = Ok(());
let ctx: BeforeSerializationInterceptorContextRef<'_> = ctx.into();
for interceptor in self.operation_int... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:22 | let mut ctx: FinalizerInterceptorContextMut<'_> = ctx.into();
for interceptor in self.interceptors() {
if let Some(interceptor) = interceptor.if_enabled(cfg) {
if let Err(new_error) = interceptor.modify_before_attempt_completion(&mut ctx, cfg)
{
if... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:23 | ) -> Result<(), InterceptorError> {
tracing::trace!("running `modify_before_completion` interceptors");
let mut result: Result<(), BoxError> = Ok(());
let mut ctx: FinalizerInterceptorContextMut<'_> = ctx.into();
for interceptor in self.interceptors() {
if let Some(intercepto... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:24 | mod tests {
use crate::client::interceptors::context::Input;
use crate::client::interceptors::{
disable_interceptor, BeforeTransmitInterceptorContextRef, BoxError, Interceptor,
InterceptorContext, InterceptorRegistrar, Interceptors, SharedInterceptor,
};
use aws_smithy_types::config_bag:... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:25 | }
let mut interceptors = Interceptors::new();
let interceptors_vec = vec![
SharedInterceptor::new(PanicInterceptor),
SharedInterceptor::new(TestInterceptor),
];
interceptors
.client_interceptors_mut()
.extend(interceptors_vec);
let ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 0c75242eb1a5ffaac25659e2419f1cbdff559d89 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/0c75242eb1a5ffaac25659e2419f1cbdff559d89/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 961 | 995 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:17 | pub struct InterceptorRegistrar {
interceptors: Vec<SharedInterceptor>,
}
impl InterceptorRegistrar {
/// Register an interceptor with this `InterceptorRegistrar`.
///
/// When this `InterceptorRegistrar` is passed to an orchestrator, the orchestrator will run the
/// registered interceptor for all... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:18 | if let Err(last_error) = result {
tracing::debug!("{}", DisplayErrorContext(&*last_error));
}
result = Err(new_error);
}
}
}
result.map_err(InterceptorError::$interceptor)
}
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:19 | #[allow(unused)]
cause: &'static str,
}
impl<T> Storable for DisableInterceptor<T>
where
T: fmt::Debug + Send + Sync + 'static,
{
type Storer = StoreReplace<Self>;
}
/// Disable an interceptor with a given cause
pub fn disable_interceptor<T: Interceptor>(cause: &'static str) -> DisableInterceptor<T> {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:20 | .map(ConditionallyEnabledInterceptor)
}
pub fn client_interceptors_mut(&mut self) -> &mut InterceptorRegistrar {
&mut self.client_interceptors
}
pub fn operation_interceptors_mut(&mut self) -> &mut InterceptorRegistrar {
&mut self.operation_interceptors
}
pub fn client_read_be... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:21 | if let Err(new_error) = interceptor.read_before_execution(&ctx, cfg) {
if let Err(last_error) = result {
tracing::debug!("{}", DisplayErrorContext(&*last_error));
}
result = Err(new_error);
}
}
}
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:22 | result = Err(new_error);
}
}
}
result.map_err(InterceptorError::modify_before_attempt_completion)
}
pub fn read_after_attempt(
&self,
ctx: &InterceptorContext<Input, Output, Error>,
cfg: &mut ConfigBag,
) -> Result<(), InterceptorError> {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:23 | result = Err(new_error);
}
}
}
result.map_err(InterceptorError::modify_before_completion)
}
pub fn read_after_execution(
&self,
ctx: &InterceptorContext<Input, Output, Error>,
cfg: &mut ConfigBag,
) -> Result<(), InterceptorError> {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:24 | #[test]
fn register_interceptor() {
let mut registrar = InterceptorRegistrar::default();
registrar.register(SharedInterceptor::new(TestInterceptor));
assert_eq!(1, registrar.interceptors.len());
}
#[test]
fn bulk_register_interceptors() {
let mut registrar = InterceptorR... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:25 | interceptors
.interceptors()
.filter(|i| i.if_enabled(&cfg).is_some())
.count(),
2
);
interceptors
.read_before_transmit(&InterceptorContext::new(Input::new(5)), &mut cfg)
.expect_err("interceptor returns error");
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 3295543612dada803b8ced9d8bc26acd7a2bd274 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3295543612dada803b8ced9d8bc26acd7a2bd274/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 961 | 984 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use crate::box_error::BoxError;
use crate::client::interceptors::context::{
AfterDeserializationInterceptorContextRef, BeforeDeserializationInterceptorContextMut,
BeforeDeserializationInterceptor... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:2 | let _cfg = cfg;
Ok(())
}
};
}
/// An interceptor allows injecting code into the SDK ’s request execution pipeline.
///
/// ## Terminology:
/// - An execution is one end-to-end invocation against an SDK client.
/// - An attempt is an attempt at performing an execution. By default executions are ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:3 | interceptor_trait_fn!(
mut modify_before_serialization,
BeforeSerializationInterceptorContextMut,
"
A hook called before the input message is marshalled into a
transport message.
This method has the ability to modify and return a new
request message of the same ty... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 81 | 140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:4 | very close to the amount of time spent marshalling the request.
**Available Information:** The [InterceptorContext::input()] is
**ALWAYS** available. Other information **WILL NOT** be available.
**Error Behavior:** If errors are raised by this hook,
execution will jump to `modify_befor... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:5 | **Available Information:** The [InterceptorContext::input()]
and [InterceptorContext::request()] are **ALWAYS** available.
Other information **WILL NOT** be available.
**Error Behavior:** If errors are raised by this hook,
execution will jump to `modify_before_completion` with the raise... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:6 | );
interceptor_trait_fn!(
mut modify_before_signing,
BeforeTransmitInterceptorContextMut,
"
A hook called before the transport request message is signed.
This method has the ability to modify and return a new transport
request message of the same type.
**Whe... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:7 | **When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier in the request pipeline. This method may be
called multiple times in the event of retries. The duration between
invocation of this hook and `after_signing` is very close to
the amount of time ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 241 | 300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:8 | );
interceptor_trait_fn!(
mut modify_before_transmit,
BeforeTransmitInterceptorContextMut,
"
/// A hook called before the transport request message is sent to the
/// service. This method has the ability to modify and return
/// a new transport request message of the... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 281 | 340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:9 | **When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier in the request pipeline. This method may be
called multiple times in the event of retries. The duration between
invocation of this hook and `after_transmit` is very close to
the amount of time... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:10 | Other information **WILL NOT** be available. In the event of retries,
the `InterceptorContext` will not include changes made in previous
attempts (e.g. by request signers or other interceptors).
**Error Behavior:** If errors are raised by this
hook, execution will jump to `modify_before... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:11 | );
interceptor_trait_fn!(
read_before_deserialization,
BeforeDeserializationInterceptorContextRef,
"
A hook called before the transport response message is unmarshalled
**When:** This will **ALWAYS** be called once per attempt, except when a
failure occurs earlier i... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:12 | the duration may include the time spent downloading
the response data.
**Available Information:** The [InterceptorContext::input()],
[InterceptorContext::request()],
[InterceptorContext::response()] and
[InterceptorContext::output_or_error()] are **ALWAYS** available. In the eve... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime-api/src/client/interceptors.rs:13 | context: &mut FinalizerInterceptorContextMut<'_>,
cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
let _ctx = context;
let _cfg = cfg;
Ok(())
}
/// A hook called when an attempt is completed.
///
/// **When:** This will **ALWAYS** be called once per attempt, as long ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime-api/src/client/interceptors.rs | Apache-2.0 | 253a15511a6a5f2940e1c914cc11de3a55235259 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/253a15511a6a5f2940e1c914cc11de3a55235259/sdk/aws-smithy-runtime-api/src/client/interceptors.rs | 481 | 540 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.