pub struct Packet { /* private fields */ }
Expand description
A packet of data.
Implementations§
Source§impl Packet
impl Packet
pub fn new(t: PacketType, data: &[u8]) -> Self
pub fn packet_type(&self) -> PacketType
pub fn data(&self) -> Option<&[u8]>
Trait Implementations§
impl Eq for Packet
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