pub struct PartialObject {
pub id: Option<Id>,
pub extra: Map<String, Value>,
}Expand description
The partial object a server echoes in /set created / updated and
/copy created (RFC 8620 §5.3, §5.4).
RFC 8620 §5.3 defines each created value as “an object containing any
properties of the created Foo object that were not sent by the client”,
and §5.4 defines each /copy created value as the “properties of the
copied Foo object that are set by the server”. Neither is a full Foo,
so a full typed Foo cannot hold them: required client-sent properties
are absent. This type keeps the one property nearly every object type
reports, id, and every other returned property in Self::extra.
Deserialize a property out of extra with serde_json::from_value
when it is needed (e.g. blobId / threadId / size for an Email,
RFC 8621 §4.6).
Fields§
§id: Option<Id>The server-assigned id, when the server reported one. None for an
updated entry (the id is the map key) or an object type whose id
is not server-set.
extra: Map<String, Value>Every other property the server returned, keyed by wire name.