pub struct FormatB;Expand description
Empty type used to represent the format of handler that is not provided state
This type is just used to prevent implementation conflicts between stateful and stateless handlers
Trait Implementations§
Source§impl<State, Fun, Fut, Res> Handler<'_, State, FormatB, (), Res> for Fun
Handler implementation for async functions with no arguments
impl<State, Fun, Fut, Res> Handler<'_, State, FormatB, (), Res> for Fun
Handler implementation for async functions with no arguments
struct Res;
async fn test() -> Res {
Res {}
}Source§impl<State, Fun, Fut, Req, Res> Handler<'_, State, FormatB, Req, Res> for Funwhere
Fun: Fn(Req) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Res> + Send + 'static,
Req: FromRequest,
Res: IntoResponse,
State: Send + 'static,
Handler implementation for async functions that take the request type
without any state
impl<State, Fun, Fut, Req, Res> Handler<'_, State, FormatB, Req, Res> for Funwhere
Fun: Fn(Req) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Res> + Send + 'static,
Req: FromRequest,
Res: IntoResponse,
State: Send + 'static,
Handler implementation for async functions that take the request type without any state
struct Req;
struct Res;
async fn test(req: Req) -> Res {
Res {}
}Auto Trait Implementations§
impl Freeze for FormatB
impl RefUnwindSafe for FormatB
impl Send for FormatB
impl Sync for FormatB
impl Unpin for FormatB
impl UnsafeUnpin for FormatB
impl UnwindSafe for FormatB
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more