pub struct HidBackend(/* private fields */);
Expand description
The main entry point of this library
Implementations§
Source§impl HidBackend
impl HidBackend
Sourcepub fn new(backend: BackendType) -> Self
pub fn new(backend: BackendType) -> Self
Create a specific backend. If you don’t care and want to just use the default backend for each platform consider calling HidBackend::default instead
Sourcepub async fn enumerate(
&self,
) -> HidResult<impl Stream<Item = Device> + Send + Unpin + use<'_>>
pub async fn enumerate( &self, ) -> HidResult<impl Stream<Item = Device> + Send + Unpin + use<'_>>
Enumerates all accessible HID devices
If this library fails to retrieve the DeviceInfo of a device, it will be automatically excluded.
Trait Implementations§
Source§impl Clone for HidBackend
impl Clone for HidBackend
Source§fn clone(&self) -> HidBackend
fn clone(&self) -> HidBackend
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for HidBackend
impl Default for HidBackend
Source§fn default() -> HidBackend
fn default() -> HidBackend
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HidBackend
impl RefUnwindSafe for HidBackend
impl Send for HidBackend
impl Sync for HidBackend
impl Unpin for HidBackend
impl UnwindSafe for HidBackend
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