pub trait JmapHandler<CallerCtx>: Send + Sync {
// Required method
fn call(&self, cx: CallContext<CallerCtx>) -> HandlerFuture;
}Expand description
Implement this for each JMAP method handler.
CallerCtx is whatever your auth layer produces — an Identity, a session
token, (), etc. The dispatcher passes it through unchanged.
§/set response contract
Handlers for /set methods (RFC 8620 §5.3) that create objects MUST include
an "id" field (type string) in each entry of the "created" map. The
dispatcher reads this field to accumulate createdIds in the response.
Entries without an "id" field are silently skipped — the dispatcher cannot
retroactively error a method call that already returned success.
Required Methods§
Sourcefn call(&self, cx: CallContext<CallerCtx>) -> HandlerFuture
fn call(&self, cx: CallContext<CallerCtx>) -> HandlerFuture
Handle one method call. See CallContext for what cx carries.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".