pub struct JmapStateChange {
pub type: String,
pub changed: BTreeMap<String, JmapTypeStates>,
}Expand description
JMAP StateChange push notification (RFC 8620 §7.1).
changed is keyed by account id, then JMAP type, then opaque new state.
Fields§
§type: StringThe @type tag of the push object, always StateChange.
changed: BTreeMap<String, JmapTypeStates>The new type states, keyed by account id.
Implementations§
Source§impl JmapStateChange
impl JmapStateChange
Sourcepub fn parse(data: &str) -> Result<Self, JmapStateChangeParseError>
pub fn parse(data: &str) -> Result<Self, JmapStateChangeParseError>
Decodes one SSE frame’s data field as a JMAP StateChange. Empty or
whitespace-only payloads return an empty changed map (keep-alive).
Trait Implementations§
Source§impl Clone for JmapStateChange
impl Clone for JmapStateChange
Source§fn clone(&self) -> JmapStateChange
fn clone(&self) -> JmapStateChange
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 JmapStateChange
impl Debug for JmapStateChange
Source§impl Default for JmapStateChange
impl Default for JmapStateChange
Source§fn default() -> JmapStateChange
fn default() -> JmapStateChange
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for JmapStateChange
impl<'de> Deserialize<'de> for JmapStateChange
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
impl Eq for JmapStateChange
Source§impl PartialEq for JmapStateChange
impl PartialEq for JmapStateChange
Source§impl Serialize for JmapStateChange
impl Serialize for JmapStateChange
impl StructuralPartialEq for JmapStateChange
Auto Trait Implementations§
impl Freeze for JmapStateChange
impl RefUnwindSafe for JmapStateChange
impl Send for JmapStateChange
impl Sync for JmapStateChange
impl Unpin for JmapStateChange
impl UnsafeUnpin for JmapStateChange
impl UnwindSafe for JmapStateChange
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