Skip to main content

HandlerFuture

Type Alias HandlerFuture 

Source
pub type HandlerFuture = Pin<Box<dyn Future<Output = Result<(Value, Vec<Invocation>), JmapError>> + Send>>;
Expand description

The return type for all JmapHandler implementations.

Handlers must return a Send future. The concrete type is a heap-allocated trait object so the trait itself remains object-safe.

The Vec<Invocation> holds zero or more additional entries to append to methodResponses immediately after the primary response (in order). Most handlers return an empty Vec. RFC 8621 §7.5 EmailSubmission/set uses this to append the implicit Email/set invocation for onSuccessUpdateEmail.

Aliased Type§

pub struct HandlerFuture { /* private fields */ }