pub trait AuthProxy: Send + Sync {
// Required method
fn transform<'life0, 'life1, 'async_trait>(
&'life0 self,
req: HttpRequest,
caller: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HttpRequest, AuthProxyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Pipeline: host fn → auth_proxy.transform(req, caller) → http_client.send(req).
Consume-and-return so middlewares compose: m2.transform(m1.transform(req, c)?, c)?.
caller is the package that made the call ("main" for the user’s script);
blueprint auth-proxy injection applies only to main.
Required Methods§
fn transform<'life0, 'life1, 'async_trait>(
&'life0 self,
req: HttpRequest,
caller: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HttpRequest, AuthProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".