Struct naia_client::Packet [−][src]
pub struct Packet { /* fields omitted */ }
A Packet that can be sent to the Server
Implementations
impl Packet
[src]
impl Packet
[src]pub fn new(payload: Vec<u8, Global>) -> Packet
[src]
Create a packet from a Vec payload, converts data to a slice on the heap
pub fn new_raw(payload: Box<[u8], Global>) -> Packet
[src]
Create a packet from an existing boxed slice of bytes
pub fn empty() -> Packet
[src]
Create an empty packet
pub fn payload(&self) -> &[u8]
[src]
Get at the underlying byte payload of the packet
Trait Implementations
impl StructuralEq for Packet
[src]
impl StructuralEq for Packet
[src]impl StructuralPartialEq for Packet
[src]
impl StructuralPartialEq for Packet
[src]Auto Trait Implementations
impl RefUnwindSafe for Packet
impl RefUnwindSafe for Packet
impl UnwindSafe for Packet
impl UnwindSafe for Packet