Exchange

Trait Exchange 

Source
pub trait Exchange {
    // Required method
    fn exchange(
        &mut self,
        command: &[u8],
        timeout: Duration,
    ) -> impl Future<Output = Result<Vec<u8>, Error>> + Send;
}
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( &mut self, command: &[u8], timeout: Duration, ) -> impl Future<Output = Result<Vec<u8>, Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Blanket Exchange impl for mutable references

Source§

async fn exchange( &mut self, command: &[u8], timeout: Duration, ) -> Result<Vec<u8>, Error>

Implementors§

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