Trait aws_smithy_http::middleware::AsyncMapRequest
source · pub trait AsyncMapRequest {
type Error: Into<Box<dyn Error + Send + Sync>> + 'static;
type Future: Future<Output = Result<Request, Self::Error>> + Send + 'static;
// Required methods
fn name(&self) -> &'static str;
fn apply(&self, request: Request) -> Self::Future;
}
Expand description
AsyncMapRequest
defines an asynchronous middleware that transforms an operation::Request
.
Typically, these middleware will read configuration from the PropertyBag
and use it to
augment the request.
Most fundamental middleware is expressed as AsyncMapRequest
’s synchronous cousin, MapRequest
,
including signing & endpoint resolution. AsyncMapRequest
is used for async credential
retrieval (e.g., from AWS STS’s AssumeRole operation).