Struct ledger_mob::DeviceHandle
source · pub struct DeviceHandle<T: Device> { /* private fields */ }
Expand description
Implementations§
source§impl<T: Device + Send> DeviceHandle<T>
impl<T: Device + Send> DeviceHandle<T>
sourcepub async fn account_keys(
&mut self,
account_index: u32
) -> Result<ViewAccount, Error>
pub async fn account_keys( &mut self, account_index: u32 ) -> Result<ViewAccount, Error>
Fetch root keys for the provided account index
sourcepub async fn subaddress_keys(
&mut self,
account_index: u32,
subaddress_index: u64
) -> Result<ViewSubaddress, Error>
pub async fn subaddress_keys( &mut self, account_index: u32, subaddress_index: u64 ) -> Result<ViewSubaddress, Error>
Fetch subaddress keys for the provided account and subaddress index
sourcepub async fn key_image(
&mut self,
account_index: u32,
subaddress_index: u64,
tx_public_key: RistrettoPublic
) -> Result<KeyImage, Error>
pub async fn key_image( &mut self, account_index: u32, subaddress_index: u64, tx_public_key: RistrettoPublic ) -> Result<KeyImage, Error>
Resolve a key image for a given tx_out
sourcepub async fn account(&mut self, account_index: u32) -> AccountHandle<T>
pub async fn account(&mut self, account_index: u32) -> AccountHandle<T>
Fetch a handle to a specific on-device account by SLIP-0010 index
Trait Implementations§
source§impl<T: Clone + Device> Clone for DeviceHandle<T>
impl<T: Clone + Device> Clone for DeviceHandle<T>
source§fn clone(&self) -> DeviceHandle<T>
fn clone(&self) -> DeviceHandle<T>
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<T: Device + Send> Device for DeviceHandle<T>
impl<T: Device + Send> Device for DeviceHandle<T>
Re-export Device trait for MobileCoin DeviceHandle
source§fn request<'a, 'b, 'life0, 'async_trait, RESP>(
&'life0 mut self,
request: impl 'async_trait + ApduReq<'a> + Send,
buff: &'b mut [u8],
timeout: Duration
) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait>>where
RESP: 'async_trait + ApduBase<'b>,
Self: 'async_trait,
'a: 'async_trait,
'b: 'async_trait,
'life0: 'async_trait,
fn request<'a, 'b, 'life0, 'async_trait, RESP>( &'life0 mut self, request: impl 'async_trait + ApduReq<'a> + Send, buff: &'b mut [u8], timeout: Duration ) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait>>where RESP: 'async_trait + ApduBase<'b>, Self: 'async_trait, 'a: 'async_trait, 'b: 'async_trait, 'life0: 'async_trait,
Issue a request APDU, returning a reponse APDU
source§impl<T: Device> From<T> for DeviceHandle<T>
impl<T: Device> From<T> for DeviceHandle<T>
Create a DeviceHandle wrapper from a type implementing Device
impl<T: Device> Send for DeviceHandle<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for DeviceHandle<T>
impl<T> Sync for DeviceHandle<T>where T: Send,
impl<T> Unpin for DeviceHandle<T>
impl<T> !UnwindSafe for DeviceHandle<T>
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