pub enum ServerToClientEvent {
Show 24 variants
Error {
error: String,
},
Authenticated,
Pong {
data: u32,
},
Ready {
event: ReadyEvent,
},
Message {
message: Message,
},
MessageUpdate {
id: MessageId,
channel: ChannelId,
data: PartialMessage,
},
MessageDelete {
id: MessageId,
channel: ChannelId,
},
ChannelCreate {
channel: Channel,
},
ChannelUpdate {
id: ChannelId,
data: PartialChannel,
clear: Option<ChannelField>,
},
ChannelDelete {
id: ChannelId,
},
ChannelGroupJoin {
id: ChannelId,
user: UserId,
},
ChannelGroupLeave {
id: ChannelId,
user: UserId,
},
ChannelStartTyping {
id: ChannelId,
user: UserId,
},
ChannelStopTyping {
id: ChannelId,
user: UserId,
},
ChannelAck {
id: ChannelId,
user: UserId,
message_id: MessageId,
},
ServerUpdate {
id: ServerId,
data: PartialServer,
clear: Option<ServerField>,
},
ServerDelete {
id: ServerId,
},
ServerMemberUpdate {
id: MemberId,
data: PartialMember,
clear: Option<MemberField>,
},
ServerMemberJoin {
id: ServerId,
user: UserId,
},
ServerMemberLeave {
id: ServerId,
user: UserId,
},
ServerRoleUpdate {
id: ServerId,
role_id: RoleId,
data: PartialRole,
clear: Option<RoleField>,
},
ServerRoleDelete {
id: ServerId,
role_id: RoleId,
},
UserUpdate {
id: UserId,
data: UserPatch,
clear: Option<UserField>,
},
UserRelationship {
id: UserId,
user: UserId,
status: RelationshipStatus,
},
}Expand description
Any message that the server can send to the client.
Variants§
Error
Authenticated
Pong
Ready
Fields
§
event: ReadyEventMessage
MessageUpdate
MessageDelete
ChannelCreate
ChannelUpdate
ChannelDelete
ChannelGroupJoin
ChannelGroupLeave
ChannelStartTyping
ChannelStopTyping
ChannelAck
ServerUpdate
ServerDelete
ServerMemberUpdate
ServerMemberJoin
ServerMemberLeave
ServerRoleUpdate
ServerRoleDelete
UserUpdate
UserRelationship
Trait Implementations§
Source§impl Clone for ServerToClientEvent
impl Clone for ServerToClientEvent
Source§fn clone(&self) -> ServerToClientEvent
fn clone(&self) -> ServerToClientEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 ServerToClientEvent
impl Debug for ServerToClientEvent
Source§impl<'de> Deserialize<'de> for ServerToClientEvent
impl<'de> Deserialize<'de> for ServerToClientEvent
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 ServerToClientEvent
impl PartialEq for ServerToClientEvent
impl Eq for ServerToClientEvent
impl StructuralPartialEq for ServerToClientEvent
Auto Trait Implementations§
impl Freeze for ServerToClientEvent
impl RefUnwindSafe for ServerToClientEvent
impl Send for ServerToClientEvent
impl Sync for ServerToClientEvent
impl Unpin for ServerToClientEvent
impl UnwindSafe for ServerToClientEvent
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