[][src]Struct plm::Message

pub struct Message {
    pub from: Address,
    pub to: Address,
    pub flags: MessageFlags,
    pub hops_remaining: u8,
    pub max_hops: u8,
    pub cmd1: Command,
    pub cmd2: Command,
    pub data: [u8; 14],
}

A Message can be sent to a device with a given Address.

Fields

from: Address

The address of the device that sent the Message.

to: Address

The address of the receipient of the Message.

flags: MessageFlags

Flags describing various attributes of the Message.

hops_remaining: u8

The number of hops remaining

max_hops: u8

The maximum number of hops allowed for this Message.

cmd1: Command

The first Command contained in the Message.

cmd2: Command

The second Command contained in the Message. Often this is a group number or other details accompanying cmd1.

data: [u8; 14]

Arbitrary user data, only available in an extended Message.

Implementations

impl Message[src]

pub fn is_ack(&self, other: &Message) -> bool[src]

Returns true if other is an ACK of self.

Trait Implementations

impl Clone for Message[src]

impl Copy for Message[src]

impl Debug for Message[src]

impl Default for Message[src]

impl From<(Address, Command, Command, MessageFlags)> for Message[src]

impl From<(Address, Command, Command)> for Message[src]

impl From<(Address, Command, MessageFlags)> for Message[src]

impl From<(Address, Command)> for Message[src]

impl PartialEq<Message> for Message[src]

impl StructuralPartialEq for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

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.