pub trait Handler:
Send
+ Sync
+ 'static {
// Required method
fn call(
&self,
data: &[u8],
ctx: RequestContext,
) -> BoxFuture<'static, HandlerResult>;
}Expand description
Trait for handler functions.
Required Methods§
Sourcefn call(
&self,
data: &[u8],
ctx: RequestContext,
) -> BoxFuture<'static, HandlerResult>
fn call( &self, data: &[u8], ctx: RequestContext, ) -> BoxFuture<'static, HandlerResult>
Handle a request with raw payload bytes.