pub struct InputDeviceProxy { /* private fields */ }
Implementations§
Source§impl InputDeviceProxy
impl InputDeviceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.input.report/InputDevice.
Sourcepub fn take_event_stream(&self) -> InputDeviceEventStream
pub fn take_event_stream(&self) -> InputDeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_input_reports_reader(
&self,
reader: ServerEnd<InputReportsReaderMarker>,
) -> Result<(), Error>
pub fn get_input_reports_reader( &self, reader: ServerEnd<InputReportsReaderMarker>, ) -> Result<(), Error>
Open a new InputReportsReader on this device. Each reader receives their own reports.
Sourcepub fn get_descriptor(
&self,
) -> QueryResponseFut<DeviceDescriptor, DefaultFuchsiaResourceDialect>
pub fn get_descriptor( &self, ) -> QueryResponseFut<DeviceDescriptor, DefaultFuchsiaResourceDialect>
Gets the device descriptor for this device.
Sourcepub fn send_output_report(
&self,
report: &OutputReport,
) -> QueryResponseFut<InputDeviceSendOutputReportResult, DefaultFuchsiaResourceDialect>
pub fn send_output_report( &self, report: &OutputReport, ) -> QueryResponseFut<InputDeviceSendOutputReportResult, DefaultFuchsiaResourceDialect>
Send a single output report to the device. This will throw an error if the output report does not follow the OutputDescriptor.
Sourcepub fn get_feature_report(
&self,
) -> QueryResponseFut<InputDeviceGetFeatureReportResult, DefaultFuchsiaResourceDialect>
pub fn get_feature_report( &self, ) -> QueryResponseFut<InputDeviceGetFeatureReportResult, DefaultFuchsiaResourceDialect>
Get the feature report for a given device. This requests the state of the device’s features.
Sourcepub fn set_feature_report(
&self,
report: &FeatureReport,
) -> QueryResponseFut<InputDeviceSetFeatureReportResult, DefaultFuchsiaResourceDialect>
pub fn set_feature_report( &self, report: &FeatureReport, ) -> QueryResponseFut<InputDeviceSetFeatureReportResult, DefaultFuchsiaResourceDialect>
Set the feature report for a given device. This sets the state of the device’s features.
Sourcepub fn get_input_report(
&self,
device_type: DeviceType,
) -> QueryResponseFut<InputDeviceGetInputReportResult, DefaultFuchsiaResourceDialect>
pub fn get_input_report( &self, device_type: DeviceType, ) -> QueryResponseFut<InputDeviceGetInputReportResult, DefaultFuchsiaResourceDialect>
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.
Trait Implementations§
Source§impl Clone for InputDeviceProxy
impl Clone for InputDeviceProxy
Source§fn clone(&self) -> InputDeviceProxy
fn clone(&self) -> InputDeviceProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InputDeviceProxy
impl Debug for InputDeviceProxy
Source§impl InputDeviceProxyInterface for InputDeviceProxy
impl InputDeviceProxyInterface for InputDeviceProxy
type GetDescriptorResponseFut = QueryResponseFut<DeviceDescriptor>
type SendOutputReportResponseFut = QueryResponseFut<Result<(), i32>>
type GetFeatureReportResponseFut = QueryResponseFut<Result<FeatureReport, i32>>
type SetFeatureReportResponseFut = QueryResponseFut<Result<(), i32>>
type GetInputReportResponseFut = QueryResponseFut<Result<InputReport, i32>>
fn get_input_reports_reader( &self, reader: ServerEnd<InputReportsReaderMarker>, ) -> Result<(), Error>
fn get_descriptor(&self) -> Self::GetDescriptorResponseFut
fn send_output_report( &self, report: &OutputReport, ) -> Self::SendOutputReportResponseFut
fn get_feature_report(&self) -> Self::GetFeatureReportResponseFut
fn set_feature_report( &self, report: &FeatureReport, ) -> Self::SetFeatureReportResponseFut
fn get_input_report( &self, device_type: DeviceType, ) -> Self::GetInputReportResponseFut
Source§impl Proxy for InputDeviceProxy
impl Proxy for InputDeviceProxy
Source§type Protocol = InputDeviceMarker
type Protocol = InputDeviceMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for InputDeviceProxy
impl !RefUnwindSafe for InputDeviceProxy
impl Send for InputDeviceProxy
impl Sync for InputDeviceProxy
impl Unpin for InputDeviceProxy
impl !UnwindSafe for InputDeviceProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)