pub struct DevicePing {
pub dst_addr: u8,
pub src_addr: u8,
}Expand description
Represents a Device Ping packet (0x28).
Fields§
§dst_addr: u8§src_addr: u8Implementations§
Source§impl DevicePing
impl DevicePing
Trait Implementations§
Source§impl Clone for DevicePing
impl Clone for DevicePing
Source§fn clone(&self) -> DevicePing
fn clone(&self) -> DevicePing
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 CrsfPacket for DevicePing
impl CrsfPacket for DevicePing
Source§const PACKET_TYPE: PacketType = PacketType::DevicePing
const PACKET_TYPE: PacketType = PacketType::DevicePing
The CRSF frame type identifier for this packet.
Source§const MIN_PAYLOAD_SIZE: usize = 2usize
const MIN_PAYLOAD_SIZE: usize = 2usize
The minimum expected length of the packet’s payload in bytes.
For fixed-size packets, this is the same as the payload size.
fn to_bytes(&self, buffer: &mut [u8]) -> Result<usize, CrsfParsingError>
Source§fn from_bytes(data: &[u8]) -> Result<Self, CrsfParsingError>
fn from_bytes(data: &[u8]) -> Result<Self, CrsfParsingError>
Creates a packet instance from a payload byte slice.
The slice is guaranteed to have a length of at least
MIN_PAYLOAD_SIZE.fn validate_buffer_size(&self, buffer: &[u8]) -> Result<(), CrsfParsingError>
Source§impl Debug for DevicePing
impl Debug for DevicePing
Source§impl PartialEq for DevicePing
impl PartialEq for DevicePing
impl Eq for DevicePing
impl StructuralPartialEq for DevicePing
Auto Trait Implementations§
impl Freeze for DevicePing
impl RefUnwindSafe for DevicePing
impl Send for DevicePing
impl Sync for DevicePing
impl Unpin for DevicePing
impl UnwindSafe for DevicePing
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