pub enum ControlRequest {
CreateDevice {
config: DeviceConfig,
device: ServerEnd<DeviceMarker>,
control_handle: ControlControlHandle,
},
CreatePair {
config: DevicePairConfig,
device_pair: ServerEnd<DevicePairMarker>,
control_handle: ControlControlHandle,
},
}
Expand description
Control interface.
Control
allows creating an arbitrary number of Device
s and
DevicePair
s.
Variants§
CreateDevice
Creates a Device
with given config
.
- request
config
new device configuration. - request
device
grants control over the device. Closed with an epitaph ifconfig
is not valid.
CreatePair
Creates a DevicePair
with given config
.
If config
is not valid or the device could not be created,
device_pair
is closed with an error epitaph.
- request
config
new device pair configuration. - request
device_pair
grants control over the device pair. Closed with an epitaph ifconfig
is not valid.
Fields
§
config: DevicePairConfig
§
device_pair: ServerEnd<DevicePairMarker>
§
control_handle: ControlControlHandle
Implementations§
source§impl ControlRequest
impl ControlRequest
pub fn into_create_device( self, ) -> Option<(DeviceConfig, ServerEnd<DeviceMarker>, ControlControlHandle)>
pub fn into_create_pair( self, ) -> Option<(DevicePairConfig, ServerEnd<DevicePairMarker>, ControlControlHandle)>
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 ControlRequest
impl !RefUnwindSafe for ControlRequest
impl Send for ControlRequest
impl Sync for ControlRequest
impl Unpin for ControlRequest
impl !UnwindSafe for ControlRequest
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