Module salvo_core::handler
source · Expand description
Handler
is used for handle Request
.
Handler
can be used as middleware to handleRequest
.
Example
use salvo_core::prelude::*;
#[handler]
async fn middleware() {
}
#[tokio::main]
async fn main() {
Router::new().hoop(middleware);
}
Handler
can be used as endpoint to handleRequest
.
Example
#[handler]
async fn middleware() {
}
#[tokio::main]
async fn main() {
Router::new().handle(middleware);
}
Structs
This is a empty implement for
Handler
.Traits
Functions
none_skipper
will skipper nothing.