Skip to main content

uhttp/
handler.rs

1use crate::types::HyperInfallibleResponse;
2
3pub type HandlerResponse = HyperInfallibleResponse;
4pub type HandlerResult = anyhow::Result<HyperInfallibleResponse>;
5
6pub type HandleFunc = Box<
7  dyn Send
8    + Sync
9    + Fn(
10      crate::Request,
11      crate::Response,
12    ) -> std::pin::Pin<
13      Box<dyn Send + std::future::Future<Output = crate::Result<HyperInfallibleResponse>>>,
14    >,
15>;
16
17pub type Result<T> = anyhow::Result<T>;