pub struct Remote {
pub dst_addr: u8,
pub src_addr: u8,
pub payload: RemotePayload,
}Expand description
Represents a Remote-related packet (frame type 0x3A).
This is a container for various sub-packets related to remote functionality, identified by a sub-type.
Fields§
§dst_addr: u8§src_addr: u8§payload: RemotePayloadImplementations§
Trait Implementations§
Source§impl CrsfPacket for Remote
impl CrsfPacket for Remote
Source§const PACKET_TYPE: PacketType = PacketType::RadioId
const PACKET_TYPE: PacketType = PacketType::RadioId
The CRSF frame type identifier for this packet.
Source§const MIN_PAYLOAD_SIZE: usize = 11usize
const MIN_PAYLOAD_SIZE: usize = 11usize
The minimum expected length of the packet’s payload in bytes.
For fixed-size packets, this is the same as the payload size.
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 to_bytes(&self, buffer: &mut [u8]) -> Result<usize, CrsfParsingError>
fn validate_buffer_size(&self, buffer: &[u8]) -> Result<(), CrsfParsingError>
impl StructuralPartialEq for Remote
Auto Trait Implementations§
impl Freeze for Remote
impl RefUnwindSafe for Remote
impl Send for Remote
impl Sync for Remote
impl Unpin for Remote
impl UnwindSafe for Remote
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