#[non_exhaustive]pub struct JmapResponse {
pub method_responses: Vec<Invocation>,
pub session_state: State,
pub created_ids: Option<HashMap<Id, Id>>,
pub extra: Map<String, Value>,
}Expand description
JMAP response envelope (RFC 8620 §3.4).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.method_responses: Vec<Invocation>Ordered list of method responses (same 3-tuple structure as requests).
session_state: StateOpaque server state token. Changes when any data type’s state advances.
created_ids: Option<HashMap<Id, Id>>Maps client-supplied creation IDs to server-assigned IDs. Omitted when no objects were created in the batch (RFC 8620 §3.4).
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§
Source§impl JmapResponse
impl JmapResponse
Sourcepub fn new(
method_responses: Vec<Invocation>,
session_state: State,
created_ids: Option<HashMap<Id, Id>>,
) -> Self
pub fn new( method_responses: Vec<Invocation>, session_state: State, created_ids: Option<HashMap<Id, Id>>, ) -> Self
Construct a JmapResponse.
Required because the struct is #[non_exhaustive] and cannot be
built with a struct literal outside this crate.
Trait Implementations§
Source§impl Clone for JmapResponse
impl Clone for JmapResponse
Source§fn clone(&self) -> JmapResponse
fn clone(&self) -> JmapResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JmapResponse
impl Debug for JmapResponse
Source§impl<'de> Deserialize<'de> for JmapResponse
impl<'de> Deserialize<'de> for JmapResponse
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for JmapResponse
impl PartialEq for JmapResponse
Source§fn eq(&self, other: &JmapResponse) -> bool
fn eq(&self, other: &JmapResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for JmapResponse
impl Serialize for JmapResponse
impl StructuralPartialEq for JmapResponse
Auto Trait Implementations§
impl Freeze for JmapResponse
impl RefUnwindSafe for JmapResponse
impl Send for JmapResponse
impl Sync for JmapResponse
impl Unpin for JmapResponse
impl UnsafeUnpin for JmapResponse
impl UnwindSafe for JmapResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more