pub struct PacketBytesMessage;Expand description
Variable-length byte-payload codec. See module docs for the bit layout.
Trait Implementations§
Source§impl Clone for PacketBytesMessage
impl Clone for PacketBytesMessage
Source§fn clone(&self) -> PacketBytesMessage
fn clone(&self) -> PacketBytesMessage
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 PacketBytesMessage
impl Debug for PacketBytesMessage
Source§impl Default for PacketBytesMessage
impl Default for PacketBytesMessage
Source§fn default() -> PacketBytesMessage
fn default() -> PacketBytesMessage
Returns the “default value” for a type. Read more
Source§impl MessageCodec for PacketBytesMessage
impl MessageCodec for PacketBytesMessage
Source§const PAYLOAD_BITS: u32 = 91
const PAYLOAD_BITS: u32 = 91
91 information bits matching Ldpc174_91’s K. Of those, 4 bits
are length, 80 bits are up to 10 bytes of payload, and the
final 7 bits are a CRC-7 over the head 84 bits.
Source§const CRC_BITS: u32 = 7
const CRC_BITS: u32 = 7
CRC-7 trailing the payload — x^7 + x^3 + 1 over bits 0..84.
The 7-bit CRC sits at info bits 84..91. See the private
crc7 helper in this module / Self::verify_info.
Source§fn verify_info(info: &[u8]) -> bool
fn verify_info(info: &[u8]) -> bool
Verify the CRC-7 trailer. Called by the FEC layer (BP / OSD) to reject parity-converged candidates whose CRC doesn’t match — substantially reduces the false-decode rate over the naive “always accept” verifier.
impl Copy for PacketBytesMessage
Auto Trait Implementations§
impl Freeze for PacketBytesMessage
impl RefUnwindSafe for PacketBytesMessage
impl Send for PacketBytesMessage
impl Sync for PacketBytesMessage
impl Unpin for PacketBytesMessage
impl UnsafeUnpin for PacketBytesMessage
impl UnwindSafe for PacketBytesMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more