NonSendExchange

Trait NonSendExchange 

Source
pub trait NonSendExchange {
    // Required method
    async fn exchange(
        &mut self,
        command: &[u8],
        timeout: Duration,
    ) -> Result<Vec<u8>, Error>;
}
Expand description

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

It is the same as Exchange, but it doesn’t enforce the Send bound on the returned future.

Required Methods§

Source

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

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.

Implementors§

Source§

impl NonSendExchange for GenericDevice

Source§

impl NonSendExchange for UsbDevice

NonSendExchange impl for sending APDUs to a UsbDevice

Source§

impl<T: Exchange> NonSendExchange for T

Blanket NonSendExchange impl for types that implement Exchange.