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: Header
The 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§
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