Skip to main content

InputDeviceLocalServerHandler

Trait InputDeviceLocalServerHandler 

Source
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§

Source

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.

Source

fn get_descriptor( &mut self, responder: Responder<GetDescriptor, ___T>, ) -> impl Future<Output = ()>

Gets the device descriptor for this device.

Source

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.

Source

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.

Source

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.

Source

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§

Source

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.

Implementations on Foreign Types§

Source§

impl<___H, ___T> InputDeviceLocalServerHandler<___T> for Local<___H>
where ___H: InputDeviceServerHandler<___T>, ___T: Transport,

Source§

async fn get_input_reports_reader( &mut self, request: Request<GetInputReportsReader, ___T>, )

Source§

async fn get_descriptor(&mut self, responder: Responder<GetDescriptor, ___T>)

Source§

async fn send_output_report( &mut self, request: Request<SendOutputReport, ___T>, responder: Responder<SendOutputReport, ___T>, )

Source§

async fn get_feature_report( &mut self, responder: Responder<GetFeatureReport, ___T>, )

Source§

async fn set_feature_report( &mut self, request: Request<SetFeatureReport, ___T>, responder: Responder<SetFeatureReport, ___T>, )

Source§

async fn get_input_report( &mut self, request: Request<GetInputReport, ___T>, responder: Responder<GetInputReport, ___T>, )

Source§

async fn on_unknown_interaction(&mut self, ordinal: u64)

Implementors§