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).

Required Associated Types§

source

type Error: Into<Box<dyn Error + Send + Sync>> + 'static

source

type Future: Future<Output = Result<Request, Self::Error>> + Send + 'static

Required Methods§

source

fn name(&self) -> &'static str

Returns the name of this map request operation for inclusion in a tracing span.

source

fn apply(&self, request: Request) -> Self::Future

Implementors§