#[non_exhaustive]pub enum ClientEvent {
Show 21 variants
StatusChanged {
status: ClientStatus,
failure: Option<ClientFailure>,
},
TransactionChanged(TransactionEvent),
ChatUpserted {
chat_id: InlineId,
},
ChatDeleted {
chat_id: InlineId,
},
ChatParticipantsChanged {
chat_id: InlineId,
},
UserUpserted {
user_id: InlineId,
},
SpaceUpserted {
space_id: InlineId,
},
SpaceMemberChanged {
space_id: InlineId,
user_id: InlineId,
removed: bool,
},
UserSettingsChanged {},
MessageActionInvoked {
interaction_id: InlineId,
chat_id: InlineId,
message_id: InlineId,
actor_user_id: InlineId,
action_id: String,
data: Vec<u8>,
},
MessageActionAnswered {
interaction_id: InlineId,
toast: Option<String>,
},
MessageUpserted {
chat_id: InlineId,
message_id: InlineId,
},
MessageStored {
message: MessageRecord,
},
MessageDeleted {
chat_id: InlineId,
message_id: InlineId,
},
ChatHistoryCleared {
chat_id: InlineId,
before_date: Option<i64>,
},
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,
},
UserStatusChanged {
user_id: InlineId,
is_online: Option<bool>,
last_online: Option<i64>,
},
BotPresenceChanged {
bot_user_id: InlineId,
chat_id: Option<InlineId>,
kind: String,
comment: Option<String>,
avatar_changed: bool,
},
NewMessageNotification {
message: MessageRecord,
reason: String,
},
}Expand description
Committed client event for apps, bridges, agents, and hosts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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.
ChatDeleted
A chat was deleted from durable client state.
ChatParticipantsChanged
The participant snapshot for a chat changed.
UserUpserted
A user was inserted or updated in the local store.
SpaceUpserted
A space was inserted or updated in durable client state.
SpaceMemberChanged
Durable membership for a space changed.
Fields
UserSettingsChanged
Durable global user settings changed.
MessageActionInvoked
A bot message action was invoked and requires lossless host handling.
Fields
MessageActionAnswered
A previously invoked message action received a UI response.
Fields
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.
ChatHistoryCleared
Stored history was cleared for a chat, optionally before a timestamp.
Fields
ReactionChanged
Reactions for a message changed.
Fields
ReadStateChanged
Read state changed for a chat.
Typing
Typing state changed.
Fields
UserStatusChanged
Transient user presence changed.
Fields
BotPresenceChanged
Transient bot activity/presence changed for a peer.
Fields
NewMessageNotification
A notification-class message update was received.
Fields
message: MessageRecordMessage referenced by the notification.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more