Skip to main content

trillium_api/
halt.rs

1use trillium::{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
8impl Handler for Halt {
9    async fn run(&self, conn: Conn) -> Conn {
10        conn.halt()
11    }
12}