Skip to main content

Exchange

Trait Exchange 

Source
pub trait Exchange {
    // Required method
    fn exchange<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        command: &'life1 [u8],
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Exchange trait provides a low-level interface for byte-wise exchange of APDU commands with a ledger devices

Required Methods§

Source

fn exchange<'life0, 'life1, 'async_trait>( &'life0 mut self, command: &'life1 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Exchange + Send> Exchange for &mut T

Blanket Exchange impl for mutable references

Source§

fn exchange<'life0, 'life1, 'async_trait>( &'life0 mut self, command: &'life1 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl Exchange for GenericDevice

Source§

impl Exchange for LedgerHandle

Exchange implementation for LedgerProvider backed LedgerHandle

Source§

impl Exchange for BleDevice

Exchange impl for BLE backed devices

Source§

impl Exchange for TcpDevice

Exchange implementation for the TCP transport

Source§

impl Exchange for UsbDevice

Exchange impl for sending APDUs to a UsbDevice