#[non_exhaustive]#[repr(u8)]pub enum OpCode {
Identify = 0,
SelectProtocol = 1,
Ready = 2,
Heartbeat = 3,
SessionDescription = 4,
Speaking = 5,
HeartbeatAck = 6,
Resume = 7,
Hello = 8,
Resumed = 9,
ClientDisconnect = 13,
}
Expand description
Voice gateway opcodes.
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.
Identify = 0
Start a voice websocket connection.
SelectProtocol = 1
Select the protocol to use.
Ready = 2
Received to indicate completion of handshake.
Heartbeat = 3
Fired periodically to keep connection alive.
SessionDescription = 4
Received to indicate session description.
Speaking = 5
Sent and received to indicate speaking status.
HeartbeatAck = 6
Received in response to a heartbeat.
Resume = 7
Resume a previously disconnected session.
Hello = 8
Received after connecting, contains heartbeat interval.
Resumed = 9
Received to indicate a successful resume.
ClientDisconnect = 13
Received to indicate someone was disconnected.
Trait Implementations§
source§impl<'de> Deserialize<'de> for OpCode
impl<'de> Deserialize<'de> for OpCode
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 Copy for OpCode
impl Eq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations§
impl Freeze for OpCode
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnwindSafe for OpCode
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)