pub struct Packet {
pub header: Header,
pub data: Vec<u8>,
pub parsed: Option<Message>,
}Expand description
Packet is our internal representation of a recieved packet Used to parse messages sent back by displays This struct does allocate!
Fields§
§header: HeaderThe packet header
data: Vec<u8>Raw data, if you’re getting pixels this is the one you want
parsed: Option<Message>For anything that’s messaging, we try to parse it or cast it to string here
Implementations§
Trait Implementations§
source§impl PartialEq<Packet> for Packet
impl PartialEq<Packet> for Packet
impl StructuralPartialEq for Packet
Auto Trait Implementations§
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