Trait ledger_zondax_generic::AppExt

source ·
pub trait AppExt<E>: App
where E: Exchange + Send + Sync, E::Error: Error,
{ // Provided methods fn get_device_info<'life0, 'async_trait>( transport: &'life0 E ) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>> where 'life0: 'async_trait { ... } fn get_app_info<'life0, 'async_trait>( transport: &'life0 E ) -> Pin<Box<dyn Future<Output = Result<AppInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>> where 'life0: 'async_trait { ... } fn get_version<'life0, 'async_trait>( transport: &'life0 E ) -> Pin<Box<dyn Future<Output = Result<Version, LedgerAppError<E::Error>>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn send_chunks<'life0, 'life1, 'async_trait, I>( transport: &'life0 E, command: APDUCommand<I>, message: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<E::AnswerType>, LedgerAppError<E::Error>>> + Send + 'async_trait>> where I: 'async_trait + Deref<Target = [u8]> + Send + Sync, 'life0: 'async_trait, 'life1: 'async_trait { ... } }
Expand description

Common commands for any given APP

This trait is automatically implemented for any type that implements App

Provided Methods§

source

fn get_device_info<'life0, 'async_trait>( transport: &'life0 E ) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait,

Retrieve the device info

Works only in the dashboard

source

fn get_app_info<'life0, 'async_trait>( transport: &'life0 E ) -> Pin<Box<dyn Future<Output = Result<AppInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait,

Retrieve the app info

Works only in app (TOOD: dashboard support)

source

fn get_version<'life0, 'async_trait>( transport: &'life0 E ) -> Pin<Box<dyn Future<Output = Result<Version, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Retrieve the app version

source

fn send_chunks<'life0, 'life1, 'async_trait, I>( transport: &'life0 E, command: APDUCommand<I>, message: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<E::AnswerType>, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where I: 'async_trait + Deref<Target = [u8]> + Send + Sync, 'life0: 'async_trait, 'life1: 'async_trait,

Stream a long request in chunks

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, E> AppExt<E> for T
where T: App, E: Exchange + Send + Sync, E::Error: Error,