#[non_exhaustive]pub struct DeviceMessage {
pub contents: Option<Contents>,
/* private fields */
}Expand description
A message returned from a device.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.contents: Option<Contents>Implementations§
Source§impl DeviceMessage
impl DeviceMessage
pub fn new() -> Self
Sourcepub fn set_contents<T: Into<Option<Contents>>>(self, v: T) -> Self
pub fn set_contents<T: Into<Option<Contents>>>(self, v: T) -> Self
Sets the value of contents.
Note that all the setters affecting contents are mutually
exclusive.
Sourcepub fn status_update(&self) -> Option<&Box<StatusUpdate>>
pub fn status_update(&self) -> Option<&Box<StatusUpdate>>
The value of contents
if it holds a StatusUpdate, None if the field is not set or
holds a different branch.
Sourcepub fn set_status_update<T: Into<Box<StatusUpdate>>>(self, v: T) -> Self
pub fn set_status_update<T: Into<Box<StatusUpdate>>>(self, v: T) -> Self
Sets the value of contents
to hold a StatusUpdate.
Note that all the setters affecting contents are
mutually exclusive.
Sourcepub fn stream_status(&self) -> Option<&Box<StreamStatus>>
pub fn stream_status(&self) -> Option<&Box<StreamStatus>>
The value of contents
if it holds a StreamStatus, None if the field is not set or
holds a different branch.
Sourcepub fn set_stream_status<T: Into<Box<StreamStatus>>>(self, v: T) -> Self
pub fn set_stream_status<T: Into<Box<StreamStatus>>>(self, v: T) -> Self
Sets the value of contents
to hold a StreamStatus.
Note that all the setters affecting contents are
mutually exclusive.
Sourcepub fn stream_data(&self) -> Option<&Box<StreamData>>
pub fn stream_data(&self) -> Option<&Box<StreamData>>
The value of contents
if it holds a StreamData, None if the field is not set or
holds a different branch.
Sourcepub fn set_stream_data<T: Into<Box<StreamData>>>(self, v: T) -> Self
pub fn set_stream_data<T: Into<Box<StreamData>>>(self, v: T) -> Self
Sets the value of contents
to hold a StreamData.
Note that all the setters affecting contents are
mutually exclusive.
Trait Implementations§
Source§impl Clone for DeviceMessage
impl Clone for DeviceMessage
Source§fn clone(&self) -> DeviceMessage
fn clone(&self) -> DeviceMessage
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more