pub trait Middleware:
Send
+ Sync
+ Debug {
// Required method
fn handle(&self, request: ElifRequest, next: Next) -> NextFuture<'static>;
// Provided method
fn name(&self) -> &'static str { ... }
}
Expand description
New middleware trait with Laravel-style handle(request, next) pattern Uses boxed futures to be dyn-compatible
Required Methods§
Sourcefn handle(&self, request: ElifRequest, next: Next) -> NextFuture<'static>
fn handle(&self, request: ElifRequest, next: Next) -> NextFuture<'static>
Handle the request and call the next middleware in the chain