Module aws_smithy_runtime_api::client::interceptors::context
source · Expand description
Interceptor context.
Interceptors have access to varying pieces of context during the course of an operation.
An operation is composed of multiple phases. The initial phase is “before serialization”, which has the original input as context. The next phase is “before transmit”, which has the serialized request as context. Depending on which hook is being called with the dispatch context, the serialized request may or may not be signed (which should be apparent from the hook name). Following the “before transmit” phase is the “before deserialization” phase, which has the raw response available as context. Finally, the “after deserialization” phase has both the raw and parsed response available.
To summarize:
- Before serialization: Only has the operation input.
- Before transmit: Only has the serialized request.
- Before deserialization: Has the raw response.
- After deserialization: Has the raw response and the parsed response.
When implementing hooks, if information from a previous phase is required, then implement
an earlier hook to examine that context, and save off any necessary information into the
ConfigBag
for later hooks to examine. Interior mutability is NOT
recommended for storing request-specific information in your interceptor implementation.
Use the ConfigBag
instead.
Structs§
- Interceptor context for hooks after deserializing the response.
- Interceptor context for hooks before deserializing the response.
- Interceptor context for hooks before deserializing the response.
- Interceptor context for the
modify_before_serialization
hook. - Interceptor context for the
read_before_execution
andread_before_serialization
hooks. - Interceptor context for several hooks in between serialization and transmission.
- Interceptor context for several hooks in between serialization and transmission.
- Type-erased operation error.
- Interceptor context for finalization hooks.
- Interceptor context for finalization hooks.
- Type-erased operation input.
- A container for the data currently available to an interceptor.
- Type-erased operation output.
Enums§
- The result of attempting to rewind a request.
Type Aliases§
- Type-erased result for an operation.