pub struct ControlPacket {
pub is_collector: bool,
}Expand description
Control packet sent from Central to Peripheral.
In auto-pairing mode the serialized frame is prefixed with a 4-byte
little-endian magic (see [serialize_with_magic] / [parse_with_magic]);
in manual-pairing mode no magic is sent and the source-MAC filter is the
discriminator. Both nodes must agree on the pairing mode (and on the
statistics feature, which gates sequence_number) for frames to parse.
Fields§
§is_collector: boolWhether the central is currently in collector mode; the peripheral mirrors this flag to keep the pair in sync.
Implementations§
Trait Implementations§
Source§impl Debug for ControlPacket
impl Debug for ControlPacket
Source§impl<'de> Deserialize<'de> for ControlPacket
impl<'de> Deserialize<'de> for ControlPacket
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ControlPacket
impl PartialEq for ControlPacket
Source§fn eq(&self, other: &ControlPacket) -> bool
fn eq(&self, other: &ControlPacket) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ControlPacket
impl Serialize for ControlPacket
impl StructuralPartialEq for ControlPacket
Auto Trait Implementations§
impl Freeze for ControlPacket
impl RefUnwindSafe for ControlPacket
impl Send for ControlPacket
impl Sync for ControlPacket
impl Unpin for ControlPacket
impl UnsafeUnpin for ControlPacket
impl UnwindSafe for ControlPacket
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