pub trait StorageProxyHandler<Cx>:
Send
+ Sync
+ 'static {
// Required methods
fn get<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn head<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
body: Body,
cx: Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Response>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Available on crate feature
server only.Expand description
The HTTP-facing surface produced by the blanket impl below. A host router
dispatches to these three methods; each returns a fully-formed axum
Response (streaming for GET), or a ProxyError the router turns into a
response.
Required Methods§
Sourcefn get<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Response>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Serve a (optionally ranged) body read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".