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 Devices and
DevicePairs.
Variants§
CreateDevice
Creates a Device with given config.
- request
confignew device configuration. - request
devicegrants control over the device. Closed with an epitaph ifconfigis 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
confignew device pair configuration. - request
device_pairgrants control over the device pair. Closed with an epitaph ifconfigis not valid.
Fields
§
config: DevicePairConfig§
device_pair: ServerEnd<DevicePairMarker>§
control_handle: ControlControlHandleImplementations§
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