pub trait ExtraRouteHandler: Send + Sync {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
req: RouteRequest,
) -> Pin<Box<dyn Future<Output = RouteResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A stateless handler for an extra route registered via
ProxyServer::with_extra_routes.
The framework-agnostic seam (request parts in, response parts out) the
embedder uses for service-specific endpoints without naming axum.
Required Methods§
Sourcefn handle<'life0, 'async_trait>(
&'life0 self,
req: RouteRequest,
) -> Pin<Box<dyn Future<Output = RouteResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
req: RouteRequest,
) -> Pin<Box<dyn Future<Output = RouteResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a request and produce a response.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".