#[non_exhaustive]pub struct StatusUpdate {
pub state: DeviceState,
pub properties: HashMap<String, String>,
pub features: String,
/* private fields */
}Expand description
A StatusUpdate message given over the ADB protocol for the device state.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.state: DeviceStateThe device’s state
properties: HashMap<String, String>A map of properties with information about this device.
features: StringA comma-separated list of “features” that this device supports.
Implementations§
Source§impl StatusUpdate
impl StatusUpdate
pub fn new() -> Self
Sourcepub fn set_state<T: Into<DeviceState>>(self, v: T) -> Self
pub fn set_state<T: Into<DeviceState>>(self, v: T) -> Self
Sets the value of state.
Sourcepub fn set_properties<T, K, V>(self, v: T) -> Self
pub fn set_properties<T, K, V>(self, v: T) -> Self
Sets the value of properties.
Sourcepub fn set_features<T: Into<String>>(self, v: T) -> Self
pub fn set_features<T: Into<String>>(self, v: T) -> Self
Sets the value of features.
Trait Implementations§
Source§impl Clone for StatusUpdate
impl Clone for StatusUpdate
Source§fn clone(&self) -> StatusUpdate
fn clone(&self) -> StatusUpdate
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatusUpdate
impl Debug for StatusUpdate
Source§impl Default for StatusUpdate
impl Default for StatusUpdate
Source§fn default() -> StatusUpdate
fn default() -> StatusUpdate
Returns the “default value” for a type. Read more
Source§impl Message for StatusUpdate
impl Message for StatusUpdate
Source§impl PartialEq for StatusUpdate
impl PartialEq for StatusUpdate
impl StructuralPartialEq for StatusUpdate
Auto Trait Implementations§
impl Freeze for StatusUpdate
impl RefUnwindSafe for StatusUpdate
impl Send for StatusUpdate
impl Sync for StatusUpdate
impl Unpin for StatusUpdate
impl UnwindSafe for StatusUpdate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more