pub struct ParsedPacket {
pub version: u16,
pub serial: u32,
pub has_extrinsics: bool,
pub pkt_type: u8,
}Expand description
Decoded contents of a packet that passed the magic-bytes check.
The version field is intentionally not validated by
parse_packet; callers decide whether to drop a version-mismatch
packet (the daemon does this for peer announcements) or surface it
to the user (discovery clients do this so an incompatible device
can still be listed).
Fields§
§version: u16§serial: u32§has_extrinsics: bool§pkt_type: u8Trait Implementations§
Source§impl Clone for ParsedPacket
impl Clone for ParsedPacket
Source§fn clone(&self) -> ParsedPacket
fn clone(&self) -> ParsedPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParsedPacket
impl Debug for ParsedPacket
Source§impl PartialEq for ParsedPacket
impl PartialEq for ParsedPacket
impl Copy for ParsedPacket
impl Eq for ParsedPacket
impl StructuralPartialEq for ParsedPacket
Auto Trait Implementations§
impl Freeze for ParsedPacket
impl RefUnwindSafe for ParsedPacket
impl Send for ParsedPacket
impl Sync for ParsedPacket
impl Unpin for ParsedPacket
impl UnwindSafe for ParsedPacket
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