#[non_exhaustive]pub struct Mailbox {
pub id: Id,
pub name: String,
pub parent_id: Option<Id>,
pub role: Option<MailboxRole>,
pub sort_order: u32,
pub total_emails: u32,
pub unread_emails: u32,
pub total_threads: u32,
pub unread_threads: u32,
pub my_rights: MailboxRights,
pub is_subscribed: bool,
pub extra: Map<String, Value>,
}Expand description
A JMAP Mailbox object (RFC 8621 §2).
Mailboxes are the containers for Email objects. Each Email must belong to
at least one Mailbox. Mailboxes form an acyclic forest via parent_id.
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.id: IdServer-assigned immutable identifier.
name: StringUser-visible name for this Mailbox.
parent_id: Option<Id>Id of the parent Mailbox, or None if top-level.
role: Option<MailboxRole>Well-known role identifying the Mailbox’s common purpose.
sort_order: u32Client UI sort position; lower values sort first among siblings.
total_emails: u32Total number of Emails in this Mailbox (server-set).
unread_emails: u32Number of Emails without $seen or $draft (server-set).
total_threads: u32Number of Threads with at least one Email in this Mailbox (server-set).
unread_threads: u32Number of unread Threads in this Mailbox (server-set).
my_rights: MailboxRightsACL rights the authenticated user has on this Mailbox (server-set).
is_subscribed: boolWhether the user has subscribed to this Mailbox.
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).