[][src]Struct multiwii_serial_protocol_2::MspPacket

pub struct MspPacket {
    pub cmd: u16,
    pub direction: MspPacketDirection,
    pub data: Vec<u8>,
}

A decoded MSP packet, with a command code, direction and payload

Fields

cmd: u16direction: MspPacketDirectiondata: Vec<u8>

Methods

impl MspPacket[src]

pub fn packet_size_bytes(&self) -> usize[src]

Number of bytes that this packet requires to be packed

pub fn packet_size_bytes_v2(&self) -> usize[src]

Number of bytes that this packet requires to be packed

pub fn serialize(&self, output: &mut [u8]) -> Result<(), MspPacketParseError>[src]

Serialize to network bytes

pub fn serialize_v2(&self, output: &mut [u8]) -> Result<(), MspPacketParseError>[src]

Serialize to network bytes

Trait Implementations

impl Clone for MspPacket[src]

impl Debug for MspPacket[src]

impl PartialEq<MspPacket> for MspPacket[src]

impl StructuralPartialEq for MspPacket[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.