Skip to main content

Module middleware

Module middleware 

Source
Expand description

Middleware (spec §4.1): async fn handle(&self, ctx, next). Composable, ordering explicit, no tower, no magic.

Structs§

Next
The remainder of the middleware chain plus the endpoint handler.

Traits§

Middleware
Wraps request handling. Call next.run(&mut *ctx).await to continue; return early to short-circuit (auth rejections, rate limits, …).

Type Aliases§

MiddlewareFuture
Boxed future returned by middleware. The lifetime ties to the request.