pub trait Handler<T, S>: Sized {
// Required method
fn call(
self,
cx: &mut HttpContext,
req: Incoming,
state: &S
) -> impl Future<Output = Response> + Send;
// Provided method
fn with_state(self, state: S) -> HandlerService<Self, S, T>
where S: Clone { ... }
}Required Methods§
fn call( self, cx: &mut HttpContext, req: Incoming, state: &S ) -> impl Future<Output = Response> + Send
Provided Methods§
fn with_state(self, state: S) -> HandlerService<Self, S, T>where
S: Clone,
Object Safety§
This trait is not object safe.