pub struct TransportNativeHID { /* private fields */ }Implementations§
Source§impl TransportNativeHID
impl TransportNativeHID
Sourcepub fn list_ledgers(api: &HidApi) -> impl Iterator<Item = &DeviceInfo>
pub fn list_ledgers(api: &HidApi) -> impl Iterator<Item = &DeviceInfo>
Get a list of ledger devices available
Sourcepub fn new(api: &HidApi) -> Result<TransportNativeHID, LedgerHIDError>
pub fn new(api: &HidApi) -> Result<TransportNativeHID, LedgerHIDError>
Sourcepub fn open_device(
api: &HidApi,
device: &DeviceInfo,
) -> Result<TransportNativeHID, LedgerHIDError>
pub fn open_device( api: &HidApi, device: &DeviceInfo, ) -> Result<TransportNativeHID, LedgerHIDError>
pub fn exchange<I>( &self, command: &APDUCommand<I>, ) -> Result<APDUAnswer<Vec<u8>>, LedgerHIDError>
Trait Implementations§
Source§impl Exchange for TransportNativeHID
impl Exchange for TransportNativeHID
Source§type Error = LedgerHIDError
type Error = LedgerHIDError
Error defined by Transport used
Source§type AnswerType = Vec<u8>
type AnswerType = Vec<u8>
The concrete type containing the APDUAnswer
Source§fn exchange<'life0, 'life1, 'async_trait, I>(
&'life0 self,
command: &'life1 APDUCommand<I>,
) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<<TransportNativeHID as Exchange>::AnswerType>, <TransportNativeHID as Exchange>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
I: Deref<Target = [u8]> + Send + Sync + 'async_trait,
TransportNativeHID: 'async_trait,
fn exchange<'life0, 'life1, 'async_trait, I>(
&'life0 self,
command: &'life1 APDUCommand<I>,
) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<<TransportNativeHID as Exchange>::AnswerType>, <TransportNativeHID as Exchange>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
I: Deref<Target = [u8]> + Send + Sync + 'async_trait,
TransportNativeHID: 'async_trait,
Send a command with the given transport and retrieve an answer or a transport error
Auto Trait Implementations§
impl !Freeze for TransportNativeHID
impl RefUnwindSafe for TransportNativeHID
impl Send for TransportNativeHID
impl Sync for TransportNativeHID
impl Unpin for TransportNativeHID
impl UnwindSafe for TransportNativeHID
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