#[non_exhaustive]pub struct Mailbox {Show 14 fields
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 metadata: Option<Map<String, Value>>,
pub private_metadata: Option<Map<String, Value>>,
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; None
serializes as null.
role: Option<MailboxRole>Well-known role identifying the Mailbox’s common purpose; None
serializes as null.
sort_order: u32Client UI sort position; lower values sort first among siblings.
Defaults to 0.
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.
metadata: Option<Map<String, Value>>Shared metadata, keyed by namespace identifier
(draft-ietf-jmap-metadata-04 §2). Each value is a JSON object (§2.1).
None when absent, which -04 §2 treats as {}; in an update a
null value “is equivalent to {}” (-04 §3.2) and also decodes as
None.
private_metadata: Option<Map<String, Value>>The authenticated user’s own metadata, keyed by namespace
identifier (draft-ietf-jmap-metadata-04 §2). Same shape and None
handling as metadata.
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).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mailbox
impl<'de> Deserialize<'de> for Mailbox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Mailbox
impl GetObject for Mailbox
Source§impl JmapObject for Mailbox
impl JmapObject for Mailbox
Source§impl QueryObject for Mailbox
impl QueryObject for Mailbox
Source§type Comparator = MailboxComparator
type Comparator = MailboxComparator
Source§impl SetObject for Mailbox
RFC 8621 §2 (rfc8621.txt:487, 554, 567, 572, 577, 623): id is
“(immutable; server-set)”; the four counts and myRights are
“(server-set)”. draft-ietf-jmap-metadata-04 §3.2: clients write
metadata and privateMetadata through Foo/set.
impl SetObject for Mailbox
RFC 8621 §2 (rfc8621.txt:487, 554, 567, 572, 577, 623): id is
“(immutable; server-set)”; the four counts and myRights are
“(server-set)”. draft-ietf-jmap-metadata-04 §3.2: clients write
metadata and privateMetadata through Foo/set.
Source§const SERVER_SET: &'static [&'static str]
const SERVER_SET: &'static [&'static str]
/set method text never accepts from a
client, on create or update, is server-set too. Read moreSource§const CLIENT_SETTABLE: &'static [&'static str]
const CLIENT_SETTABLE: &'static [&'static str]
SERVER_SET: the ones a
client may set through /set. Read moreSource§const IMMUTABLE: &'static [&'static str]
const IMMUTABLE: &'static [&'static str]
CLIENT_SETTABLE properties the spec marks “immutable”: “The
value MUST NOT change after the object is created.” (RFC 8620 §1.1).
A property the /set method text accepts on create but not on update
is immutable too. Read more