Struct lifx_core::RawMessage[][src]

pub struct RawMessage {
    pub frame: Frame,
    pub frame_addr: FrameAddress,
    pub protocol_header: ProtocolHeader,
    pub payload: Vec<u8>,
}

The raw message structure

Contains a low-level protocol info. This is what is sent and received via UDP packets.

To parse the payload, use Message::from_raw.

Fields

Methods

impl RawMessage
[src]

Build a RawMessage (which is suitable for sending on the network) from a given Message type.

If BuildOptions::target is None, then the message is addressed to all devices. Else it should be a bulb UID (MAC address)

The total size (in bytes) of the packed version of this message.

Validates that this object was constructed correctly. Panics if not.

Packs this RawMessage into some bytes that can be send over the network.

The length of the returned data will be RawMessage::packed_size in size.

Given some bytes (generally read from a network socket), unpack the data into a RawMessage structure.

Trait Implementations

impl Debug for RawMessage
[src]

Formats the value using the given formatter. Read more

impl Clone for RawMessage
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for RawMessage
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for RawMessage

impl Sync for RawMessage