pub struct ReceivePacket {
pub op: Opcodes,
pub d: Box<RawValue>,
pub s: Option<u64>,
pub t: Option<GatewayEvent>,
}Expand description
A JSON packet that the client would receive over the Discord gateway.
Fields§
§op: OpcodesThe opcode for this payload.
d: Box<RawValue>The JSON value for this payload.
s: Option<u64>§t: Option<GatewayEvent>The name of the event that was fired, if applicable.
Trait Implementations§
Source§impl Clone for ReceivePacket
impl Clone for ReceivePacket
Source§fn clone(&self) -> ReceivePacket
fn clone(&self) -> ReceivePacket
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 ReceivePacket
impl Debug for ReceivePacket
Source§impl<'de> Deserialize<'de> for ReceivePacket
impl<'de> Deserialize<'de> for ReceivePacket
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 ReceivePacket
impl RefUnwindSafe for ReceivePacket
impl Send for ReceivePacket
impl Sync for ReceivePacket
impl Unpin for ReceivePacket
impl UnwindSafe for ReceivePacket
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