Skip to main content

trillium_api/
halt.rs

1use trillium::{async_trait, Conn, Handler};
2
3/// a struct that halts the Conn handler sequence. see [`Conn::halt`]
4/// for more.
5#[derive(Clone, Copy, Debug)]
6pub struct Halt;
7
8#[async_trait]
9impl Handler for Halt {
10    async fn run(&self, conn: Conn) -> Conn {
11        conn.halt()
12    }
13}