Struct coins_ledger::transports::native::hid::TransportNativeHID
source · pub struct TransportNativeHID { /* private fields */ }
Expand description
Native HID transport for Ledger Nano hardware wallets
Implementations§
source§impl TransportNativeHID
impl TransportNativeHID
sourcepub fn open_all_devices() -> Result<Vec<Self>, NativeTransportError>
pub fn open_all_devices() -> Result<Vec<Self>, NativeTransportError>
Open all ledger devices.
sourcepub fn new() -> Result<Self, NativeTransportError>
pub fn new() -> Result<Self, NativeTransportError>
sourcepub fn get_manufacturer_string(&self) -> Option<String>
pub fn get_manufacturer_string(&self) -> Option<String>
Get manufacturer string. Returns None on error, or on no string.
sourcepub fn exchange(&self, command: &APDUCommand) -> Result<APDUAnswer, LedgerError>
pub fn exchange(&self, command: &APDUCommand) -> Result<APDUAnswer, LedgerError>
Exchange an APDU with the device. The response data will be written to answer_buf
, and a
APDUAnswer
struct will be created with a reference to answer_buf
.
It is strongly recommended that you use the APDUAnswer
api instead of reading the raw
answer_buf response.
If the method errors, the buf may contain a partially written response. It is not advised to read this.
Trait Implementations§
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