Trait ledger_mob::Device

pub trait Device {
    // Required method
    fn request<'a, 'b, 'life0, 'async_trait, RESP>(
        &'life0 mut self,
        request: impl ApduReq<'a> + Send + 'async_trait,
        buff: &'b mut [u8],
        timeout: Duration
    ) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait, Global>>
       where 'a: 'async_trait,
             'b: 'async_trait,
             'life0: 'async_trait,
             RESP: 'async_trait + EncDec<'b, ApduError>,
             Self: 'async_trait;

    // Provided methods
    fn app_info<'life0, 'async_trait>(
        &'life0 mut self,
        timeout: Duration
    ) -> Pin<Box<dyn Future<Output = Result<AppInfo, Error>> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: Send + 'async_trait { ... }
    fn device_info<'life0, 'async_trait>(
        &'life0 mut self,
        timeout: Duration
    ) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, Error>> + Send + 'async_trait, Global>>
       where 'life0: 'async_trait,
             Self: Send + 'async_trait { ... }
}
Expand description

Device provides a high-level interface exchanging APDU objects with implementers of Exchange

Required Methods§

fn request<'a, 'b, 'life0, 'async_trait, RESP>( &'life0 mut self, request: impl ApduReq<'a> + Send + 'async_trait, buff: &'b mut [u8], timeout: Duration ) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait, Global>>where 'a: 'async_trait, 'b: 'async_trait, 'life0: 'async_trait, RESP: 'async_trait + EncDec<'b, ApduError>, Self: 'async_trait,

Issue a request APDU, returning a reponse APDU

Provided Methods§

fn app_info<'life0, 'async_trait>( &'life0 mut self, timeout: Duration ) -> Pin<Box<dyn Future<Output = Result<AppInfo, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: Send + 'async_trait,

Fetch application information

fn device_info<'life0, 'async_trait>( &'life0 mut self, timeout: Duration ) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: Send + 'async_trait,

Fetch device information

Implementors§

§

impl<T> Device for Twhere T: Exchange + Send,

Generic Device implementation for types supporting Exchange

source§

impl<T: Device + Send> Device for DeviceHandle<T>

Re-export Device trait for MobileCoin DeviceHandle

source§

impl<T: Device + Send> Device for TransactionHandle<T>

Exchange impl on transaction context