pub enum ClientEvent {
Identify {
token: String,
},
Heartbeat,
MessageSend {
channel_id: Uuid,
content: String,
},
VoiceJoin {
channel_id: Uuid,
},
VoiceLeave,
VoiceStateUpdate {
muted: bool,
deafened: bool,
},
WebRTCOffer {
channel_id: Uuid,
sdp: String,
},
WebRTCAnswer {
channel_id: Uuid,
sdp: String,
},
ICECandidate {
channel_id: Uuid,
candidate: String,
},
}Expand description
Events sent from client to server
Variants§
Identify
Initial authentication message
Heartbeat
Heartbeat to keep connection alive
MessageSend
Send a message
VoiceJoin
Join a voice channel
VoiceLeave
Leave voice channel
VoiceStateUpdate
Update voice state (mute/deafened)
WebRTCOffer
Send WebRTC offer
WebRTCAnswer
Send WebRTC answer (for renegotiation)
ICECandidate
Send ICE candidate
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 · 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
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