pub struct LedgerKeyShared<LK: LedgerKey> { /* private fields */ }Implementations§
Sourcepub fn instance() -> Result<LedgerKeyShared<LedgerHidKey>, HWKeyError>
pub fn instance() -> Result<LedgerKeyShared<LedgerHidKey>, HWKeyError>
Get (or create on the first call) a shared instance to access LedgerKey
pub fn is_connected(&self) -> bool
Trait Implementations§
type Transport = LedgerKeyShared<LK>
fn create() -> Result<Self, HWKeyError>
Source§fn connect(&mut self) -> Result<(), HWKeyError>
fn connect(&mut self) -> Result<(), HWKeyError>
Establishes connection to the Ledger device. Read more
Source§fn get_app_details(&self) -> Result<AppDetails, HWKeyError>
fn get_app_details(&self) -> Result<AppDetails, HWKeyError>
Get information about the currently running app on Ledger
If no app is running it produces the same info from the OS.
fn open_exclusive(&self) -> Result<Arc<Mutex<Self::Transport>>, HWKeyError>
Source§fn access<A>(&self) -> Result<A, HWKeyError>
fn access<A>(&self) -> Result<A, HWKeyError>
Access a particular type of app. Please ensure that the app is actually launched with [get_app_details] before accessing it.
Source§fn get_ledger_version(&self) -> Result<LedgerDetails, HWKeyError>
fn get_ledger_version(&self) -> Result<LedgerDetails, HWKeyError>
Get information about the Ledger itself.
It’s available only if no app is launched.
Auto Trait Implementations§
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