abort

Function abort 

Source
pub fn abort<F, E>(f: F) -> Abort<F>
where F: Fn(&mut Context<'_>) -> E + Send + Sync, E: Into<Error> + Send,
Expand description

Create an endpoint which always abort the incoming request with an error of E.