pub struct Packet {
pub bytes: Vec<u8>,
}
Expand description
A packet is just a wrapper for a Vec
Fields§
§bytes: Vec<u8>
Implementations§
Source§impl Packet
impl Packet
pub fn sequence_id(&self) -> u8
Sourcepub fn packet_type(&self) -> Result<PacketType, Error>
pub fn packet_type(&self) -> Result<PacketType, Error>
Determine the type of packet
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