Expand description
All middleware must implement this trait.
Examples
struct Logger {}
impl Logger {
pub fn new() -> Self {
Self { }
}
}
impl Middle for Logger {
fn run(&self, req: &mut Request) {
println!("[{}] `{}`", req.method(), req.uri());
}
}