pub trait ApduStatic {
const CLA: u8;
const INS: u8;
// Provided methods
fn p1(&self) -> u8 { ... }
fn p2(&self) -> u8 { ... }
}Expand description
Helper trait for defining static APDU commands, automatically implements ApduReq.
use ledger_proto::{ApduStatic, ApduError, Encode, Decode};
// App information request APDU (no body)
#[derive(Clone, Debug, PartialEq, Encode, Decode)]
#[encdec(error = "ApduError")]
pub struct AppInfoReq {}
/// Set CLA and INS values for [AppInfoReq]
impl ApduStatic for AppInfoReq {
/// Application Info GET APDU is class `0xb0`
const CLA: u8 = 0xb0;
/// Application Info GET APDU is instruction `0x00`
const INS: u8 = 0x01;
}Required Associated Constants§
Provided Methods§
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 ApduStatic for AppInfoReq
Set CLA and INS values for AppInfoReq
impl ApduStatic for AppInfoReq
Set CLA and INS values for AppInfoReq