pub struct HidbusProxy { /* private fields */ }
Implementations§
Source§impl HidbusProxy
impl HidbusProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.hidbus/Hidbus.
Sourcepub fn take_event_stream(&self) -> HidbusEventStream
pub fn take_event_stream(&self) -> HidbusEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn query(
&self,
) -> QueryResponseFut<HidbusQueryResult, DefaultFuchsiaResourceDialect>
pub fn query( &self, ) -> QueryResponseFut<HidbusQueryResult, DefaultFuchsiaResourceDialect>
Obtain information about the hidbus device and supported features. Safe to call at any time.
Sourcepub fn start(
&self,
) -> QueryResponseFut<HidbusStartResult, DefaultFuchsiaResourceDialect>
pub fn start( &self, ) -> QueryResponseFut<HidbusStartResult, DefaultFuchsiaResourceDialect>
Start the hidbus device. The device may begin queueing hid reports via OnReportReceived before this function returns. The hidbus device will keep track of the number of times Start has been called and will only be stopped when Stop has been called for each Start that has been called. Theoretically, Start should not be called again by the same client unless it has called Stop.
Sourcepub fn stop(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn stop(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Stop the hidbus device.
Sourcepub fn get_descriptor(
&self,
desc_type: HidDescriptorType,
) -> QueryResponseFut<HidbusGetDescriptorResult, DefaultFuchsiaResourceDialect>
pub fn get_descriptor( &self, desc_type: HidDescriptorType, ) -> QueryResponseFut<HidbusGetDescriptorResult, DefaultFuchsiaResourceDialect>
Methods matching HID spec 1.11 Chapter 7 Requests 7.1.1 Get_Descriptor
Sourcepub fn set_descriptor(
&self,
desc_type: HidDescriptorType,
data: &[u8],
) -> QueryResponseFut<HidbusSetDescriptorResult, DefaultFuchsiaResourceDialect>
pub fn set_descriptor( &self, desc_type: HidDescriptorType, data: &[u8], ) -> QueryResponseFut<HidbusSetDescriptorResult, DefaultFuchsiaResourceDialect>
7.1.2 Set_Descriptor (optional)
Sourcepub fn get_report(
&self,
rpt_type: ReportType,
rpt_id: u8,
len: u64,
) -> QueryResponseFut<HidbusGetReportResult, DefaultFuchsiaResourceDialect>
pub fn get_report( &self, rpt_type: ReportType, rpt_id: u8, len: u64, ) -> QueryResponseFut<HidbusGetReportResult, DefaultFuchsiaResourceDialect>
7.2.1 Get_Report
Sourcepub fn set_report(
&self,
rpt_type: ReportType,
rpt_id: u8,
data: &[u8],
) -> QueryResponseFut<HidbusSetReportResult, DefaultFuchsiaResourceDialect>
pub fn set_report( &self, rpt_type: ReportType, rpt_id: u8, data: &[u8], ) -> QueryResponseFut<HidbusSetReportResult, DefaultFuchsiaResourceDialect>
7.2.2 Set_Report
Sourcepub fn get_idle(
&self,
rpt_id: u8,
) -> QueryResponseFut<HidbusGetIdleResult, DefaultFuchsiaResourceDialect>
pub fn get_idle( &self, rpt_id: u8, ) -> QueryResponseFut<HidbusGetIdleResult, DefaultFuchsiaResourceDialect>
7.2.3 Get_Idle
Sourcepub fn set_idle(
&self,
rpt_id: u8,
duration: i64,
) -> QueryResponseFut<HidbusSetIdleResult, DefaultFuchsiaResourceDialect>
pub fn set_idle( &self, rpt_id: u8, duration: i64, ) -> QueryResponseFut<HidbusSetIdleResult, DefaultFuchsiaResourceDialect>
7.2.4 Set_Idle
Sourcepub fn get_protocol(
&self,
) -> QueryResponseFut<HidbusGetProtocolResult, DefaultFuchsiaResourceDialect>
pub fn get_protocol( &self, ) -> QueryResponseFut<HidbusGetProtocolResult, DefaultFuchsiaResourceDialect>
7.2.5 Get_Protocol
Sourcepub fn set_protocol(
&self,
protocol: HidProtocol,
) -> QueryResponseFut<HidbusSetProtocolResult, DefaultFuchsiaResourceDialect>
pub fn set_protocol( &self, protocol: HidProtocol, ) -> QueryResponseFut<HidbusSetProtocolResult, DefaultFuchsiaResourceDialect>
7.2.6 Set_Protocol
Trait Implementations§
Source§impl Clone for HidbusProxy
impl Clone for HidbusProxy
Source§fn clone(&self) -> HidbusProxy
fn clone(&self) -> HidbusProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for HidbusProxy
impl Debug for HidbusProxy
Source§impl HidbusProxyInterface for HidbusProxy
impl HidbusProxyInterface for HidbusProxy
type QueryResponseFut = QueryResponseFut<Result<HidInfo, i32>>
type StartResponseFut = QueryResponseFut<Result<(), i32>>
type StopResponseFut = QueryResponseFut<()>
type GetDescriptorResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
type SetDescriptorResponseFut = QueryResponseFut<Result<(), i32>>
type GetReportResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
type SetReportResponseFut = QueryResponseFut<Result<(), i32>>
type GetIdleResponseFut = QueryResponseFut<Result<i64, i32>>
type SetIdleResponseFut = QueryResponseFut<Result<(), i32>>
type GetProtocolResponseFut = QueryResponseFut<Result<HidProtocol, i32>>
type SetProtocolResponseFut = QueryResponseFut<Result<(), i32>>
fn query(&self) -> Self::QueryResponseFut
fn start(&self) -> Self::StartResponseFut
fn stop(&self) -> Self::StopResponseFut
fn get_descriptor( &self, desc_type: HidDescriptorType, ) -> Self::GetDescriptorResponseFut
fn set_descriptor( &self, desc_type: HidDescriptorType, data: &[u8], ) -> Self::SetDescriptorResponseFut
fn get_report( &self, rpt_type: ReportType, rpt_id: u8, len: u64, ) -> Self::GetReportResponseFut
fn set_report( &self, rpt_type: ReportType, rpt_id: u8, data: &[u8], ) -> Self::SetReportResponseFut
fn get_idle(&self, rpt_id: u8) -> Self::GetIdleResponseFut
fn set_idle(&self, rpt_id: u8, duration: i64) -> Self::SetIdleResponseFut
fn get_protocol(&self) -> Self::GetProtocolResponseFut
fn set_protocol(&self, protocol: HidProtocol) -> Self::SetProtocolResponseFut
Source§impl Proxy for HidbusProxy
impl Proxy for HidbusProxy
Source§type Protocol = HidbusMarker
type Protocol = HidbusMarker
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 HidbusProxy
impl !RefUnwindSafe for HidbusProxy
impl Send for HidbusProxy
impl Sync for HidbusProxy
impl Unpin for HidbusProxy
impl !UnwindSafe for HidbusProxy
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
)