pub trait AppExt<E>: App{
// Provided methods
fn handle_response_error(
response: &APDUAnswer<E::AnswerType>,
) -> Result<(), LedgerAppError<E::Error>> { ... }
fn handle_response_error_signature(
response: &APDUAnswer<E::AnswerType>,
) -> Result<(), LedgerAppError<E::Error>> { ... }
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,
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Provided Methods§
Sourcefn handle_response_error(
response: &APDUAnswer<E::AnswerType>,
) -> Result<(), LedgerAppError<E::Error>>
fn handle_response_error( response: &APDUAnswer<E::AnswerType>, ) -> Result<(), LedgerAppError<E::Error>>
Check APDU status word. Ok on 0x9000, otherwise map to SDK errors.
Sourcefn handle_response_error_signature(
response: &APDUAnswer<E::AnswerType>,
) -> Result<(), LedgerAppError<E::Error>>
fn handle_response_error_signature( response: &APDUAnswer<E::AnswerType>, ) -> Result<(), LedgerAppError<E::Error>>
Same as handle_response_error, but also requires non-empty payload (signature).
Sourcefn 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_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,
Query device info (target_id, SE/MCU versions, flags) via BOLOS CLA/INS.
Sourcefn 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_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,
Query current app info (name, version, flags) from the device.
Sourcefn 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 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,
Query application version using the implementing app’s CLA.
Sourcefn 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>>
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>>
Send a long message in chunks using Init/Add/Last framing on p1.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".