#[non_exhaustive]pub struct ChatCapability {
pub max_body_bytes: u64,
pub max_attachment_bytes: u64,
pub max_attachments_per_message: u64,
pub supports_threads: bool,
pub supported_body_types: Vec<String>,
pub extra: Map<String, Value>,
}Expand description
Account-level capability object for "urn:ietf:params:jmap:chat".
Found at accounts[id].accountCapabilities["urn:ietf:params:jmap:chat"].
Spec: draft-atwood-jmap-chat-00 §3
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_body_bytes: u64Maximum UTF-8 byte length of a Message body.
max_attachment_bytes: u64Maximum single attachment blob size in bytes.
max_attachments_per_message: u64Maximum number of attachments per message.
supports_threads: boolWhether the server supports the optional thread model.
supported_body_types: Vec<String>The set of Message bodyType values this server understands
(draft-atwood-jmap-chat-00 §3).
Spec requirements for compliant servers:
- MUST include
"text/plain". - SHOULD include
"text/markdown"(RFC 7763 CommonMark). - SHOULD include
"application/jmap-chat-rich". - SHOULD include
"application/mls-ciphertext"for E2EE deployments. - MAY include
"application/mimi-content".
An empty Vec is non-compliant per spec ("text/plain" is
mandatory) but the client tolerates it via Default — the
consumer is responsible for enforcing the MUST and acting
accordingly (e.g. refusing to send rich messages to a server
that does not advertise the matching bodyType).
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).
Per draft-atwood-jmap-chat-00 §3 (revised 2026-05-11, spec commit
80d5e11), the five aggregate-count caps maxGroupMembers,
maxSpaceMembers, maxRolesPerSpace, maxChannelsPerSpace, and
maxCategoriesPerSpace are no longer advertised on this
capability — they are implementation-defined and enforced via
standard overQuota SetError (RFC 8620 §5.3) at Chat/set and
Space/set time. Servers that still emit them will round-trip
the values harmlessly through extra.
Trait Implementations§
Source§impl Clone for ChatCapability
impl Clone for ChatCapability
Source§fn clone(&self) -> ChatCapability
fn clone(&self) -> ChatCapability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more