Struct multiwii_serial_protocol::MspPacket
[−]
[src]
pub struct MspPacket<'a> { pub cmd: u8, pub direction: MspPacketDirection, pub data: Cow<'a, [u8]>, }
A decoded MSP packet, with a command code, direction and payload
Fields
cmd: u8
direction: MspPacketDirection
data: Cow<'a, [u8]>
Methods
impl<'a> MspPacket<'a>
[src]
fn packet_size_bytes(&self) -> usize
[src]
Number of bytes that this packet requires to be packed
fn serialize(&self, output: &mut [u8]) -> Result<(), MspPacketParseError>
[src]
Serialize to network bytes
Trait Implementations
impl<'a> Debug for MspPacket<'a>
[src]
impl<'a> Clone for MspPacket<'a>
[src]
fn clone(&self) -> MspPacket<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more