pub trait InputDeviceLocalServerHandler<___T: Transport = Channel> {
// Required methods
fn get_input_reports_reader(
&mut self,
request: Request<GetInputReportsReader, ___T>,
) -> impl Future<Output = ()>;
fn get_descriptor(
&mut self,
responder: Responder<GetDescriptor, ___T>,
) -> impl Future<Output = ()>;
fn send_output_report(
&mut self,
request: Request<SendOutputReport, ___T>,
responder: Responder<SendOutputReport, ___T>,
) -> impl Future<Output = ()>;
fn get_feature_report(
&mut self,
responder: Responder<GetFeatureReport, ___T>,
) -> impl Future<Output = ()>;
fn set_feature_report(
&mut self,
request: Request<SetFeatureReport, ___T>,
responder: Responder<SetFeatureReport, ___T>,
) -> impl Future<Output = ()>;
fn get_input_report(
&mut self,
request: Request<GetInputReport, ___T>,
responder: Responder<GetInputReport, ___T>,
) -> impl Future<Output = ()>;
// Provided method
fn on_unknown_interaction(
&mut self,
ordinal: u64,
) -> impl Future<Output = ()> { ... }
}Expand description
A server handler for the InputDevice protocol.
See InputDevice for more details.
Required Methods§
Sourcefn get_input_reports_reader(
&mut self,
request: Request<GetInputReportsReader, ___T>,
) -> impl Future<Output = ()>
fn get_input_reports_reader( &mut self, request: Request<GetInputReportsReader, ___T>, ) -> impl Future<Output = ()>
Open a new InputReportsReader on this device. Each reader receives their own reports.
Sourcefn get_descriptor(
&mut self,
responder: Responder<GetDescriptor, ___T>,
) -> impl Future<Output = ()>
fn get_descriptor( &mut self, responder: Responder<GetDescriptor, ___T>, ) -> impl Future<Output = ()>
Gets the device descriptor for this device.
Sourcefn send_output_report(
&mut self,
request: Request<SendOutputReport, ___T>,
responder: Responder<SendOutputReport, ___T>,
) -> impl Future<Output = ()>
fn send_output_report( &mut self, request: Request<SendOutputReport, ___T>, responder: Responder<SendOutputReport, ___T>, ) -> impl Future<Output = ()>
Send a single output report to the device. This will throw an error if the output report does not follow the OutputDescriptor.
Sourcefn get_feature_report(
&mut self,
responder: Responder<GetFeatureReport, ___T>,
) -> impl Future<Output = ()>
fn get_feature_report( &mut self, responder: Responder<GetFeatureReport, ___T>, ) -> impl Future<Output = ()>
Get the feature report for a given device. This requests the state of the device’s features.
Sourcefn set_feature_report(
&mut self,
request: Request<SetFeatureReport, ___T>,
responder: Responder<SetFeatureReport, ___T>,
) -> impl Future<Output = ()>
fn set_feature_report( &mut self, request: Request<SetFeatureReport, ___T>, responder: Responder<SetFeatureReport, ___T>, ) -> impl Future<Output = ()>
Set the feature report for a given device. This sets the state of the device’s features.
Sourcefn get_input_report(
&mut self,
request: Request<GetInputReport, ___T>,
responder: Responder<GetInputReport, ___T>,
) -> impl Future<Output = ()>
fn get_input_report( &mut self, request: Request<GetInputReport, ___T>, responder: Responder<GetInputReport, ___T>, ) -> impl Future<Output = ()>
For general cases, InputReportReader is the preferred way of getting
InputReports. For devices that don’t send InputReports naturally, this
method can be used to request a report from the device type indicated.
Does not block, and returns ZX_ERR_NOT_SUPPORTED if GetInputReport or
device_type are not supported.
Provided Methods§
fn on_unknown_interaction(&mut self, ordinal: u64) -> impl Future<Output = ()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.