pub struct Packet {
pub inner: PacketData,
pub ns: Str,
}
Expand description
The socket.io packet type. Each packet has a type and a namespace
Fields§
§inner: PacketData
The packet data
ns: Str
The namespace the packet belongs to
Implementations§
Source§impl Packet
impl Packet
Sourcepub fn connect_error(ns: impl Into<Str>, message: impl Into<String>) -> Self
pub fn connect_error(ns: impl Into<Str>, message: impl Into<String>) -> Self
Create a connect error packet for the given namespace with a message
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Packet
impl<'de> Deserialize<'de> for Packet
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Packet
Auto Trait Implementations§
impl !Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
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