pub trait Handler<ParamTy, State: Clone + Send + Sync + 'static> {
type Future: Future<Output = Result<Response, CatBridgeError>> + Send + 'static;
// Required method
fn call(self, req: Request<State>) -> Self::Future;
}Available on (crate features
clients or servers) and crate feature servers only.Expand description
A route handler, attempts to be an incredibly thin layer between a function, and the actual ending handler.
Implemented so we can implement for function that accepts any varying amount of args of types that implement from request parts.
ParamTy is kept to prevent generation of conflicting type implementations
of this trait. It however is not actually needed by any of our code.