Skip to main content

Crate jmap_tasks_server

Crate jmap_tasks_server 

Source
Expand description

JMAP Tasks extension method handlers (draft-ietf-jmap-tasks-06).

§Usage

Implement TasksBackend for your storage layer, then call register_tasks_handlers to wire all method names into a jmap_server::Dispatcher:

let mut dispatcher: Dispatcher<()> = Dispatcher::new();
register_tasks_handlers(&mut dispatcher, Arc::new(backend));

§memory feature (reference implementation)

Enable the memory feature to expose the memory::MemoryBackend reference implementation of TasksBackend. This is the same backend used by this crate’s own integration tests, intended for downstream contributors to study and for smoke tests / examples that do not want to stand up a real database. Not production. API stability is opt-in via this feature and may break across minor versions while the crate is pre-1.0.

Re-exports§

pub use backend::TasksBackend;
pub use task::handle_task_changes;
pub use task::handle_task_copy;
pub use task::handle_task_get;
pub use task::handle_task_query;
pub use task::handle_task_query_changes;
pub use task::handle_task_set;
pub use task_list::handle_task_list_changes;
pub use task_list::handle_task_list_get;
pub use task_list::handle_task_list_set;
pub use task_notification::handle_task_notification_changes;
pub use task_notification::handle_task_notification_get;
pub use task_notification::handle_task_notification_query;
pub use task_notification::handle_task_notification_query_changes;
pub use task_notification::handle_task_notification_set;

Modules§

backend
TasksBackend trait and supporting types for JMAP Tasks method handlers.
task
Task/* method handlers (draft-tasks-06 §4).
task_list
TaskList/* method handlers (draft-tasks-06 §3).
task_notification
TaskNotification/* method handlers (draft-tasks-06 §5).

Structs§

AddedItem
One entry in the added list of a /queryChanges response (RFC 8620 §5.6).
ChangesResult
Result of a /changes call (RFC 8620 §5.2).
ClosureHandler
A JmapHandler that wraps an async closure over a shared backend and forwards CallerCtx to it.
QueryChangesResult
Result of a /queryChanges call (RFC 8620 §5.6).
QueryResult
Result of a /query call (RFC 8620 §5.5).
SetError
A per-item error in a /set response (notCreated, notUpdated, notDestroyed maps) (RFC 8620 §5.3).

Enums§

BackendChangesError
Error type returned by JmapBackend::get_changes and JmapBackend::query_changes.
BackendSetError
Error type returned by create/update/destroy backend methods.
SetErrorType
The machine-readable type for a SetError (RFC 8620 §5.3 and RFC 8621).

Constants§

JMAP_TASKS_URI
Capability URI for urn:ietf:params:jmap:tasks. Capability URI for core JMAP Tasks support (draft-tasks-06 §1.6.1).

Traits§

GetObject
Marker for object types that support get and changes operations.
JmapBackend
Read-side backend supertrait shared by all JMAP server crates.
JmapObject
Marker trait for all JMAP object types.
QueryObject
Marker for object types that support query and queryChanges operations.
SetObject
Marker for object types that support set (create/update/destroy) operations.

Functions§

register_tasks_handlers
Register all JMAP Tasks method handlers with dispatcher.