pub enum GenericDevice {
Usb(UsbDevice),
Ble(BleDevice),
Tcp(TcpDevice),
}
Expand description
GenericDevice for communication with ledger devices, abstracts underlying transport types
Variants§
Implementations§
Trait Implementations§
Source§impl Exchange for GenericDevice
impl Exchange for GenericDevice
Source§impl From<BleDevice> for GenericDevice
impl From<BleDevice> for GenericDevice
Source§impl From<TcpDevice> for GenericDevice
impl From<TcpDevice> for GenericDevice
Auto Trait Implementations§
impl !Freeze for GenericDevice
impl !RefUnwindSafe for GenericDevice
impl Send for GenericDevice
impl !Sync for GenericDevice
impl Unpin for GenericDevice
impl !UnwindSafe for GenericDevice
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
Source§impl<T> Device for T
impl<T> Device for T
Source§fn request<'a, 'b, 'life0, 'async_trait, RESP>(
&'life0 mut self,
req: impl ApduReq<'a> + Send + 'async_trait,
buff: &'b mut [u8],
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'b: 'async_trait,
'life0: 'async_trait,
RESP: 'async_trait + EncDec<'b, ApduError>,
T: 'async_trait,
fn request<'a, 'b, 'life0, 'async_trait, RESP>(
&'life0 mut self,
req: impl ApduReq<'a> + Send + 'async_trait,
buff: &'b mut [u8],
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'b: 'async_trait,
'life0: 'async_trait,
RESP: 'async_trait + EncDec<'b, ApduError>,
T: 'async_trait,
Issue a request APDU to a device, encoding and decoding internally then returning a response APDU