pub trait ServerMiddleware:
Send
+ Sync
+ 'static {
// Provided methods
fn pre<'a>(&'a self, _request: ServerRequest<'_>) -> BoxMiddlewareFuture<'a> { ... }
fn response<'a>(
&'a self,
_context: &ServerResponseContext,
_response: ServerResponse<'_>,
) -> BoxMiddlewareFuture<'a> { ... }
fn post<'a>(
&'a self,
_context: &RequestContext<'_>,
_outcome: ServerCallOutcome,
) -> BoxMiddlewareFuture<'a> { ... }
}Expand description
Observe inbound server requests before and after dispatch.