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§
- Added
Item - One entry in the
addedlist of a/queryChangesresponse (RFC 8620 §5.6). - Changes
Result - Result of a
/changescall (RFC 8620 §5.2). - Closure
Handler - A
JmapHandlerthat wraps an async closure over a shared backend and forwardsCallerCtxto it. - Query
Changes Result - Result of a
/queryChangescall (RFC 8620 §5.6). - Query
Result - Result of a
/querycall (RFC 8620 §5.5). - SetError
- A per-item error in a
/setresponse (notCreated,notUpdated,notDestroyedmaps) (RFC 8620 §5.3).
Enums§
- Backend
Changes Error - Error type returned by
JmapBackend::get_changesandJmapBackend::query_changes. - Backend
SetError - Error type returned by create/update/destroy backend methods.
- SetError
Type - 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
getandchangesoperations. - Jmap
Backend - Read-side backend supertrait shared by all JMAP server crates.
- Jmap
Object - Marker trait for all JMAP object types.
- Query
Object - Marker for object types that support
queryandqueryChangesoperations. - SetObject
- Marker for object types that support
set(create/update/destroy) operations.
Functions§
- register_
tasks_ handlers - Register all JMAP Tasks method handlers with
dispatcher.