#[non_exhaustive]pub struct ChangesResponse {
pub account_id: Id,
pub old_state: State,
pub new_state: State,
pub has_more_changes: bool,
pub created: Vec<Id>,
pub updated: Vec<Id>,
pub destroyed: Vec<Id>,
pub updated_properties: Option<Vec<String>>,
pub extra: Map<String, Value>,
}Expand description
RFC 8620 §5.2 — Foo/changes response shape.
Reports the ids of objects created, updated, or destroyed since
old_state. If has_more_changes is true, the client should call
/changes again with since_state = new_state to retrieve the next
page; otherwise new_state is the current state.
§Extension fields
Some JMAP data-type extensions add an updatedProperties field to
their /changes response shape:
- RFC 8621 §2.2 (
Mailbox/changes): set when onlytotalEmails/unreadEmails/totalThreads/unreadThreadschanged. - RFC 9425 §5 (
Quota/changes): set when only theusedproperty changed.
For all other /changes methods (RFC 8621 §3.2 Thread/changes,
§4.3 Email/changes, plus every extension /changes method not
listed above) the server omits the field, and clients deserialize
it as None. Carrying the field on the base type avoids duplicating
the ChangesResponse shape into per-extension newtypes.
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.account_id: IdThe account the response refers to.
old_state: StateThe state token the client passed in.
new_state: StateThe current (or next-page) state token.
has_more_changes: booltrue if there are more changes the client must page through.
created: Vec<Id>Ids of objects created since old_state.
updated: Vec<Id>Ids of objects updated since old_state.
destroyed: Vec<Id>Ids of objects destroyed since old_state.
updated_properties: Option<Vec<String>>Optional list of property names that changed (RFC 8621 §2.2,
RFC 9425 §5). Servers MAY set this for Mailbox/changes and
Quota/changes responses when the only changes are to a small
known subset of properties; clients can then back-reference
/updatedProperties into a follow-up Mailbox/get or
Quota/get to fetch only those fields. For all other /changes
methods the field is absent on the wire and None here.
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).
Trait Implementations§
Source§impl Clone for ChangesResponse
impl Clone for ChangesResponse
Source§fn clone(&self) -> ChangesResponse
fn clone(&self) -> ChangesResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more