pub enum MessageEvent {
MessageReceived {
message: Box<MessageRecord>,
conversation: Box<ConversationSummary>,
},
MessageStatus {
message_id: String,
peer_node_id: String,
new_status: MessageStatus,
at_ms: i64,
},
HistoryCleared {
peer_node_id: Option<String>,
scope: HistoryScope,
deleted_messages: i64,
},
}Expand description
Event emitted by the messaging subsystem and forwarded over JSON-RPC
as messages.event notifications.
Variants§
MessageReceived
New message arrived from a peer.
Fields
§
message: Box<MessageRecord>The persisted message.
§
conversation: Box<ConversationSummary>Updated conversation summary (denormalized).
MessageStatus
Status of a previously-sent message changed (sent → delivered → read, or any → failed).
Fields
§
new_status: MessageStatusNew status.
HistoryCleared
Message history was wiped — scope: "peer" carries
peer_node_id; scope: "all" clears everything.
Trait Implementations§
Source§impl Clone for MessageEvent
impl Clone for MessageEvent
Source§fn clone(&self) -> MessageEvent
fn clone(&self) -> MessageEvent
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 MessageEvent
impl Debug for MessageEvent
Source§impl<'de> Deserialize<'de> for MessageEvent
impl<'de> Deserialize<'de> for MessageEvent
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
Auto Trait Implementations§
impl Freeze for MessageEvent
impl RefUnwindSafe for MessageEvent
impl Send for MessageEvent
impl Sync for MessageEvent
impl Unpin for MessageEvent
impl UnsafeUnpin for MessageEvent
impl UnwindSafe for MessageEvent
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