#[non_exhaustive]pub struct AdbMessage {
pub contents: Option<Contents>,
/* private fields */
}Expand description
A message to an ADB server.
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.contents: Option<Contents>Implementations§
Source§impl AdbMessage
impl AdbMessage
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
Sourcepub fn open(&self) -> Option<&Box<Open>>
pub fn open(&self) -> Option<&Box<Open>>
The value of contents
if it holds a Open, None if the field is not set or
holds a different branch.
Sourcepub fn set_open<T: Into<Box<Open>>>(self, v: T) -> Self
pub fn set_open<T: Into<Box<Open>>>(self, v: T) -> Self
Sets the value of contents
to hold a Open.
Note that all the setters affecting contents are
mutually exclusive.
§Example
ⓘ
use google_cloud_devicestreaming_v1::model::Open;
let x = AdbMessage::new().set_open(Open::default()/* use setters */);
assert!(x.open().is_some());
assert!(x.stream_data().is_none());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.
§Example
ⓘ
use google_cloud_devicestreaming_v1::model::StreamData;
let x = AdbMessage::new().set_stream_data(StreamData::default()/* use setters */);
assert!(x.stream_data().is_some());
assert!(x.open().is_none());Trait Implementations§
Source§impl Clone for AdbMessage
impl Clone for AdbMessage
Source§fn clone(&self) -> AdbMessage
fn clone(&self) -> AdbMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdbMessage
impl Debug for AdbMessage
Source§impl Default for AdbMessage
impl Default for AdbMessage
Source§fn default() -> AdbMessage
fn default() -> AdbMessage
Returns the “default value” for a type. Read more
Source§impl PartialEq for AdbMessage
impl PartialEq for AdbMessage
impl StructuralPartialEq for AdbMessage
Auto Trait Implementations§
impl Freeze for AdbMessage
impl RefUnwindSafe for AdbMessage
impl Send for AdbMessage
impl Sync for AdbMessage
impl Unpin for AdbMessage
impl UnwindSafe for AdbMessage
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