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§
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
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
)