pub struct UsbTransport { /* private fields */ }
Expand description
USB HID based transport
§Safety
Due to hidapi
this is not thread safe an only one instance must exist in an application.
If you don’t need low-level control see crate::LedgerProvider for a tokio based wrapper.
Implementations§
Source§impl UsbTransport
impl UsbTransport
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Create a new UsbTransport
Trait Implementations§
Source§impl Transport for UsbTransport
impl Transport for UsbTransport
Source§fn list<'life0, 'async_trait>(
&'life0 mut self,
_filters: Self::Filters,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 mut self,
_filters: Self::Filters,
) -> Pin<Box<dyn Future<Output = Result<Vec<LedgerInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List available devices using the UsbTransport
impl Send for UsbTransport
WARNING: THIS IS A LIE TO APPEASE async_trait
Auto Trait Implementations§
impl Freeze for UsbTransport
impl RefUnwindSafe for UsbTransport
impl Sync for UsbTransport
impl Unpin for UsbTransport
impl UnwindSafe for UsbTransport
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