pub trait InputDeviceServerHandler<___T: Transport = Channel> {
// Required methods
fn get_input_reports_reader(
&mut self,
request: Request<GetInputReportsReader, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_descriptor(
&mut self,
responder: Responder<GetDescriptor, ___T>,
) -> impl Future<Output = ()> + Send;
fn send_output_report(
&mut self,
request: Request<SendOutputReport, ___T>,
responder: Responder<SendOutputReport, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_feature_report(
&mut self,
responder: Responder<GetFeatureReport, ___T>,
) -> impl Future<Output = ()> + Send;
fn set_feature_report(
&mut self,
request: Request<SetFeatureReport, ___T>,
responder: Responder<SetFeatureReport, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_input_report(
&mut self,
request: Request<GetInputReport, ___T>,
responder: Responder<GetInputReport, ___T>,
) -> impl Future<Output = ()> + Send;
// Provided method
fn on_unknown_interaction(
&mut self,
ordinal: u64,
) -> impl Future<Output = ()> + Send { ... }
}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 = ()> + Send
fn get_input_reports_reader( &mut self, request: Request<GetInputReportsReader, ___T>, ) -> impl Future<Output = ()> + Send
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 = ()> + Send
fn get_descriptor( &mut self, responder: Responder<GetDescriptor, ___T>, ) -> impl Future<Output = ()> + Send
Gets the device descriptor for this device.
Sourcefn send_output_report(
&mut self,
request: Request<SendOutputReport, ___T>,
responder: Responder<SendOutputReport, ___T>,
) -> impl Future<Output = ()> + Send
fn send_output_report( &mut self, request: Request<SendOutputReport, ___T>, responder: Responder<SendOutputReport, ___T>, ) -> impl Future<Output = ()> + Send
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 = ()> + Send
fn get_feature_report( &mut self, responder: Responder<GetFeatureReport, ___T>, ) -> impl Future<Output = ()> + Send
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 = ()> + Send
fn set_feature_report( &mut self, request: Request<SetFeatureReport, ___T>, responder: Responder<SetFeatureReport, ___T>, ) -> impl Future<Output = ()> + Send
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 = ()> + Send
fn get_input_report( &mut self, request: Request<GetInputReport, ___T>, responder: Responder<GetInputReport, ___T>, ) -> impl Future<Output = ()> + Send
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§
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.