pub struct PacketParseAttempt {
pub preamble_ok: bool,
pub enough_for_header: bool,
pub payload_len: Option<usize>,
pub total_len: Option<usize>,
pub enough_for_total: bool,
pub crc_ok: bool,
pub parsed: Option<PacketInfo>,
}Fields§
§preamble_ok: boolWhether the leading sync/preamble bytes matched 0xA5 0x5A.
enough_for_header: boolWhether enough bytes were available to read the fixed-size header.
payload_len: Option<usize>Parsed payload length from the header when available.
total_len: Option<usize>Total packet length implied by the header when available.
enough_for_total: boolWhether the received byte stream was long enough for the full packet.
crc_ok: boolWhether the packet CRC matched.
parsed: Option<PacketInfo>Fully parsed packet when both header and CRC checks succeeded.
Trait Implementations§
Source§impl Clone for PacketParseAttempt
impl Clone for PacketParseAttempt
Source§fn clone(&self) -> PacketParseAttempt
fn clone(&self) -> PacketParseAttempt
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 moreAuto Trait Implementations§
impl Freeze for PacketParseAttempt
impl RefUnwindSafe for PacketParseAttempt
impl Send for PacketParseAttempt
impl Sync for PacketParseAttempt
impl Unpin for PacketParseAttempt
impl UnwindSafe for PacketParseAttempt
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