pub struct SendPacket<T: SendablePacket> {
pub op: Opcodes,
pub d: T,
}Expand description
A JSON packet that the client would send to the Discord Gateway.
Fields§
§op: OpcodesThe opcode for this packet.
d: TThe JSON data for this packet.
Trait Implementations§
Source§impl<T: Debug + SendablePacket> Debug for SendPacket<T>
impl<T: Debug + SendablePacket> Debug for SendPacket<T>
Source§impl<'de, T> Deserialize<'de> for SendPacket<T>where
T: Deserialize<'de> + SendablePacket,
impl<'de, T> Deserialize<'de> for SendPacket<T>where
T: Deserialize<'de> + SendablePacket,
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<T> Serialize for SendPacket<T>where
T: Serialize + SendablePacket,
impl<T> Serialize for SendPacket<T>where
T: Serialize + SendablePacket,
Auto Trait Implementations§
impl<T> Freeze for SendPacket<T>where
T: Freeze,
impl<T> RefUnwindSafe for SendPacket<T>where
T: RefUnwindSafe,
impl<T> Send for SendPacket<T>where
T: Send,
impl<T> Sync for SendPacket<T>where
T: Sync,
impl<T> Unpin for SendPacket<T>where
T: Unpin,
impl<T> UnwindSafe for SendPacket<T>where
T: UnwindSafe,
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