Struct aws_sdk_sts::client::customize::CustomizableOperation
source · pub struct CustomizableOperation<T, E, B> { /* private fields */ }
Expand description
CustomizableOperation
allows for configuring a single operation invocation before it is sent.
Implementations§
source§impl<T, E, B> CustomizableOperation<T, E, B>
impl<T, E, B> CustomizableOperation<T, E, B>
sourcepub fn interceptor(self, interceptor: impl Intercept + 'static) -> Self
pub fn interceptor(self, interceptor: impl Intercept + 'static) -> Self
Adds an interceptor that runs at specific stages of the request execution pipeline.
Note that interceptors can also be added to CustomizableOperation
by config_override
,
map_request
, and mutate_request
(the last two are implemented via interceptors under the hood).
The order in which those user-specified operation interceptors are invoked should not be relied upon
as it is an implementation detail.
sourcepub fn map_request<F, MapE>(self, f: F) -> Selfwhere
F: Fn(HttpRequest) -> Result<HttpRequest, MapE> + Send + Sync + 'static,
MapE: Error + Send + Sync + 'static,
pub fn map_request<F, MapE>(self, f: F) -> Selfwhere
F: Fn(HttpRequest) -> Result<HttpRequest, MapE> + Send + Sync + 'static,
MapE: Error + Send + Sync + 'static,
Allows for customizing the operation’s request.
sourcepub fn mutate_request<F>(self, f: F) -> Self
pub fn mutate_request<F>(self, f: F) -> Self
Convenience for map_request
where infallible direct mutation of request is acceptable.
sourcepub fn config_override(self, config_override: impl Into<Builder>) -> Self
pub fn config_override(self, config_override: impl Into<Builder>) -> Self
Overrides config for a single operation invocation.
config_override
is applied to the operation configuration level.
The fields in the builder that are Some
override those applied to the service
configuration level. For instance,
Config A | overridden by Config B | = Config C |
---|---|---|
field_1: None, | field_1: Some(v2), | field_1: Some(v2), |
field_2: Some(v1), | field_2: Some(v2), | field_2: Some(v2), |
field_3: Some(v1), | field_3: None, | field_3: Some(v1), |