#[non_exhaustive]pub enum ClientEvent {
StatusChanged {
status: ClientStatus,
failure: Option<ClientFailure>,
},
TransactionChanged(TransactionEvent),
ChatUpserted {
chat_id: InlineId,
},
UserUpserted {
user_id: InlineId,
},
MessageUpserted {
chat_id: InlineId,
message_id: InlineId,
},
MessageStored {
message: MessageRecord,
},
MessageDeleted {
chat_id: InlineId,
message_id: InlineId,
},
ReactionChanged {
chat_id: InlineId,
message_id: InlineId,
user_id: InlineId,
reaction: String,
removed: bool,
},
ReadStateChanged {
chat_id: InlineId,
},
Typing {
chat_id: InlineId,
user_id: InlineId,
is_typing: bool,
},
}Expand description
Committed client event for apps, bridges, agents, and hosts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
StatusChanged
Connection/auth status changed.
Fields
§
status: ClientStatusNew client status.
§
failure: Option<ClientFailure>Optional redacted failure details.
TransactionChanged(TransactionEvent)
A durable transaction changed state.
ChatUpserted
A chat was inserted or updated in the local store.
UserUpserted
A user was inserted or updated in the local store.
MessageUpserted
A message was inserted or updated in the local store.
MessageStored
A message was inserted or updated and the committed record is available.
Fields
§
message: MessageRecordCommitted message record.
MessageDeleted
A message was deleted or unsent.
ReactionChanged
Reactions for a message changed.
Fields
ReadStateChanged
Read state changed for a chat.
Typing
Typing state changed.
Implementations§
Source§impl ClientEvent
impl ClientEvent
Sourcepub const fn reliability(&self) -> EventReliability
pub const fn reliability(&self) -> EventReliability
Returns the event delivery reliability class.
Trait Implementations§
Source§impl Clone for ClientEvent
impl Clone for ClientEvent
Source§fn clone(&self) -> ClientEvent
fn clone(&self) -> ClientEvent
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 ClientEvent
impl Debug for ClientEvent
Source§impl<'de> Deserialize<'de> for ClientEvent
impl<'de> Deserialize<'de> for ClientEvent
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 ClientEvent
Source§impl PartialEq for ClientEvent
impl PartialEq for ClientEvent
Source§fn eq(&self, other: &ClientEvent) -> bool
fn eq(&self, other: &ClientEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ClientEvent
impl Serialize for ClientEvent
impl StructuralPartialEq for ClientEvent
Auto Trait Implementations§
impl Freeze for ClientEvent
impl RefUnwindSafe for ClientEvent
impl Send for ClientEvent
impl Sync for ClientEvent
impl Unpin for ClientEvent
impl UnsafeUnpin for ClientEvent
impl UnwindSafe for ClientEvent
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