Skip to main content

BackendCallFn

Type Alias BackendCallFn 

Source
pub type BackendCallFn<B, C> = dyn Fn(Arc<B>, CallContext<C>) -> HandlerFuture + Send + Sync + 'static;
Expand description

Type alias for the closure stored inside ClosureHandler.

The closure gets the shared backend and the call’s CallContext (method name, call id, arguments and caller). Taking the context as one #[non_exhaustive] struct lets the dispatcher pass more per-call context later without changing this signature (bd:JMAP-wf92.7).