pub enum DeviceRequest {
GetClass {
responder: DeviceGetClassResponder,
},
SetConfig {
config: Config,
responder: DeviceSetConfigResponder,
},
Read {
responder: DeviceReadResponder,
},
Write {
data: Vec<u8>,
responder: DeviceWriteResponder,
},
}
Expand description
A serial device.
Variants§
GetClass
Lookup what type of serial device this is.
Fields
§
responder: DeviceGetClassResponder
SetConfig
Set the configuration of this serial device.
Read
Reads data from the serial port.
Fields
§
responder: DeviceReadResponder
Write
Writes data to the serial port.
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_get_class(self) -> Option<DeviceGetClassResponder>
pub fn into_set_config(self) -> Option<(Config, DeviceSetConfigResponder)>
pub fn into_read(self) -> Option<DeviceReadResponder>
pub fn into_write(self) -> Option<(Vec<u8>, DeviceWriteResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceRequest
impl !RefUnwindSafe for DeviceRequest
impl Send for DeviceRequest
impl Sync for DeviceRequest
impl Unpin for DeviceRequest
impl !UnwindSafe for DeviceRequest
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