Module salvo_core::handler

source ·
Expand description

Handler is used for handle Request.

  • Handler can be used as middleware to handle Request.

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 handle Request.

Example


#[handler]
async fn middleware() {
}

#[tokio::main]
async fn main() {
    Router::new().handle(middleware);
}

Structs

This is a empty implement for Handler.

Traits

Handler
Skipper is used in many middlewares.

Functions

none_skipper will skipper nothing.