Struct lifx_core::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
sourceimpl Clone for BuildOptions
impl Clone for BuildOptions
sourcefn clone(&self) -> BuildOptions
fn clone(&self) -> BuildOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BuildOptions
impl Debug for BuildOptions
sourceimpl Default for BuildOptions
impl Default for BuildOptions
sourcefn default() -> BuildOptions
fn default() -> BuildOptions
Returns the “default value” for a type. Read more
sourceimpl PartialEq<BuildOptions> for BuildOptions
impl PartialEq<BuildOptions> for BuildOptions
sourcefn eq(&self, other: &BuildOptions) -> bool
fn eq(&self, other: &BuildOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BuildOptions) -> bool
fn ne(&self, other: &BuildOptions) -> bool
This method tests for !=
.
impl Copy for BuildOptions
impl Eq for BuildOptions
impl StructuralEq for BuildOptions
impl StructuralPartialEq for BuildOptions
Auto Trait Implementations
impl RefUnwindSafe for BuildOptions
impl Send for BuildOptions
impl Sync for BuildOptions
impl Unpin for BuildOptions
impl UnwindSafe for BuildOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more