pub enum DriverRequest {
GetSensorsList {
responder: DriverGetSensorsListResponder,
},
ActivateSensor {
sensor_id: i32,
responder: DriverActivateSensorResponder,
},
DeactivateSensor {
sensor_id: i32,
responder: DriverDeactivateSensorResponder,
},
ConfigureSensorRate {
sensor_id: i32,
sensor_rate_config: SensorRateConfig,
responder: DriverConfigureSensorRateResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: DriverControlHandle,
method_type: MethodType,
},
}
Expand description
Implemented by drivers which talk to one or more pieces of sensor hardware.
Variants§
GetSensorsList
Retrieve the details of all the sensors managed by this driver.
Fields
§
responder: DriverGetSensorsListResponder
ActivateSensor
Activate the specified sensor.
DeactivateSensor
Deactivate the specified sensor.
ConfigureSensorRate
Set the output rate for the specified sensor.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: DriverControlHandle
§
method_type: MethodType
Implementations§
Source§impl DriverRequest
impl DriverRequest
pub fn into_get_sensors_list(self) -> Option<DriverGetSensorsListResponder>
pub fn into_activate_sensor( self, ) -> Option<(i32, DriverActivateSensorResponder)>
pub fn into_deactivate_sensor( self, ) -> Option<(i32, DriverDeactivateSensorResponder)>
pub fn into_configure_sensor_rate( self, ) -> Option<(i32, SensorRateConfig, DriverConfigureSensorRateResponder)>
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 DriverRequest
impl !RefUnwindSafe for DriverRequest
impl Send for DriverRequest
impl Sync for DriverRequest
impl Unpin for DriverRequest
impl !UnwindSafe for DriverRequest
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