Struct BuildOptions

Source
pub struct BuildOptions {
    pub target: Option<u64>,
    pub ack_required: bool,
    pub res_required: bool,
    pub sequence: u8,
    pub source: u32,
}
Expand description

Options used to construct a RawMessage.

See also RawMessage::build.

Fields§

§target: Option<u64>

If not None, this is the ID of the device you want to address.

To look up the ID of a device, extract it from the FrameAddress::target field when a device sends a Message::StateService message.

§ack_required: bool

Acknowledgement message required.

Causes the light to send an Message::Acknowledgement message.

§res_required: bool

Response message required.

Some message types are sent by clients to get data from a light. These should always have res_required set to true.

§sequence: u8

A wrap around sequence number. Optional (can be zero).

By providing a unique sequence value, the response message will also contain the same sequence number, allowing a client to distinguish between different messages sent with the same source identifier.

§source: u32

A unique client identifier. Optional (can be zero).

If the source is non-zero, then the LIFX device with send a unicast message to the IP address/port of the client that sent the originating message. If zero, then the LIFX device may send a broadcast message that can be received by all clients on the same sub-net.

Trait Implementations§

Source§

impl Clone for BuildOptions

Source§

fn clone(&self) -> BuildOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BuildOptions

Source§

fn default() -> BuildOptions

Returns the “default value” for a type. Read more
Source§

impl PartialEq for BuildOptions

Source§

fn eq(&self, other: &BuildOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for BuildOptions

Source§

impl Eq for BuildOptions

Source§

impl StructuralPartialEq for BuildOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.