Skip to main content

dispatch_method

Function dispatch_method 

Source
pub async fn dispatch_method(
    method: &str,
    args: &Value,
    user: &str,
    store: &dyn MailStore,
) -> Result<(String, Value), JmapMethodError>
Expand description

Dispatch a single method call.

Returns either (method_name, result_value) for success or a method-error envelope (already in JMAP wire shape) on failure. The dispatcher itself only converts unknown method names; per-method handlers own all other error mapping.