pub enum HidbusRequest {
Query {
responder: HidbusQueryResponder,
},
Start {
responder: HidbusStartResponder,
},
Stop {
responder: HidbusStopResponder,
},
GetDescriptor {
desc_type: HidDescriptorType,
responder: HidbusGetDescriptorResponder,
},
SetDescriptor {
desc_type: HidDescriptorType,
data: Vec<u8>,
responder: HidbusSetDescriptorResponder,
},
GetReport {
rpt_type: ReportType,
rpt_id: u8,
len: u64,
responder: HidbusGetReportResponder,
},
SetReport {
rpt_type: ReportType,
rpt_id: u8,
data: Vec<u8>,
responder: HidbusSetReportResponder,
},
GetIdle {
rpt_id: u8,
responder: HidbusGetIdleResponder,
},
SetIdle {
rpt_id: u8,
duration: i64,
responder: HidbusSetIdleResponder,
},
GetProtocol {
responder: HidbusGetProtocolResponder,
},
SetProtocol {
protocol: HidProtocol,
responder: HidbusSetProtocolResponder,
},
}
Variants§
Query
Obtain information about the hidbus device and supported features. Safe to call at any time.
Fields
§
responder: HidbusQueryResponder
Start
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.
Fields
§
responder: HidbusStartResponder
Stop
Stop the hidbus device.
Fields
§
responder: HidbusStopResponder
GetDescriptor
Methods matching HID spec 1.11 Chapter 7 Requests 7.1.1 Get_Descriptor
SetDescriptor
7.1.2 Set_Descriptor (optional)
GetReport
7.2.1 Get_Report
SetReport
7.2.2 Set_Report
GetIdle
7.2.3 Get_Idle
SetIdle
7.2.4 Set_Idle
GetProtocol
7.2.5 Get_Protocol
Fields
§
responder: HidbusGetProtocolResponder
SetProtocol
7.2.6 Set_Protocol
Implementations§
Source§impl HidbusRequest
impl HidbusRequest
pub fn into_query(self) -> Option<HidbusQueryResponder>
pub fn into_start(self) -> Option<HidbusStartResponder>
pub fn into_stop(self) -> Option<HidbusStopResponder>
pub fn into_get_descriptor( self, ) -> Option<(HidDescriptorType, HidbusGetDescriptorResponder)>
pub fn into_set_descriptor( self, ) -> Option<(HidDescriptorType, Vec<u8>, HidbusSetDescriptorResponder)>
pub fn into_get_report( self, ) -> Option<(ReportType, u8, u64, HidbusGetReportResponder)>
pub fn into_set_report( self, ) -> Option<(ReportType, u8, Vec<u8>, HidbusSetReportResponder)>
pub fn into_get_idle(self) -> Option<(u8, HidbusGetIdleResponder)>
pub fn into_set_idle(self) -> Option<(u8, i64, HidbusSetIdleResponder)>
pub fn into_get_protocol(self) -> Option<HidbusGetProtocolResponder>
pub fn into_set_protocol( self, ) -> Option<(HidProtocol, HidbusSetProtocolResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HidbusRequest
impl !RefUnwindSafe for HidbusRequest
impl Send for HidbusRequest
impl Sync for HidbusRequest
impl Unpin for HidbusRequest
impl !UnwindSafe for HidbusRequest
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
Mutably borrows from an owned value. Read more