#[non_exhaustive]pub enum AnyApdu<'a> {
Show 41 variants
ProfileEnq(ProfileEnq),
Profile(Profile),
ProfileChange(ProfileChange),
ApplicationInfoEnq(ApplicationInfoEnq),
ApplicationInfo(ApplicationInfo<'a>),
EnterMenu(EnterMenu),
CaInfoEnq(CaInfoEnq),
CaInfo(CaInfo),
CaPmt(CaPmt<'a>),
CaPmtReply(CaPmtReply),
DateTimeEnq(DateTimeEnq),
DateTime(DateTime),
CloseMmi(CloseMmi),
Tune(Tune),
Replace(Replace),
ClearReplace(ClearReplace),
AskRelease(AskRelease),
Text(Text<'a>),
Enq(Enq<'a>),
Answ(Answ<'a>),
Menu(Menu<'a>),
MenuAnsw(MenuAnsw),
List(List<'a>),
DisplayControl(DisplayControl),
DisplayReply(DisplayReply),
KeypadControl(KeypadControl),
Keypress(Keypress),
SubtitleSegment(SubtitleSegment<'a>),
DisplayMessage(DisplayMessage),
SceneEndMark(SceneEndMark),
SceneDoneMessage(SceneDoneMessage),
SceneControl(SceneControl),
SubtitleDownload(SubtitleDownload<'a>),
FlushDownload(FlushDownload),
DownloadReply(DownloadReply),
CommsCmd(CommsCmd<'a>),
ConnectionDescriptor(ConnectionDescriptor<'a>),
CommsReply(CommsReply),
CommsSend(CommsSend<'a>),
CommsRcv(CommsRcv<'a>),
Unknown {
tag: ApduTag,
body: &'a [u8],
},
}Expand description
Every crate-implemented APDU object, plus an Unknown fallthrough
that preserves the raw APDU header + body for lossless round-trips.
serde uses external tagging with camelCase variant keys.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ProfileEnq(ProfileEnq)
Profile(Profile)
ProfileChange(ProfileChange)
ApplicationInfoEnq(ApplicationInfoEnq)
ApplicationInfo(ApplicationInfo<'a>)
EnterMenu(EnterMenu)
CaInfoEnq(CaInfoEnq)
CaInfo(CaInfo)
CaPmt(CaPmt<'a>)
CaPmtReply(CaPmtReply)
DateTimeEnq(DateTimeEnq)
DateTime(DateTime)
CloseMmi(CloseMmi)
Tune(Tune)
Replace(Replace)
ClearReplace(ClearReplace)
AskRelease(AskRelease)
Text(Text<'a>)
Enq(Enq<'a>)
Answ(Answ<'a>)
Menu(Menu<'a>)
MenuAnsw(MenuAnsw)
List(List<'a>)
DisplayControl(DisplayControl)
DisplayReply(DisplayReply)
KeypadControl(KeypadControl)
Keypress(Keypress)
SubtitleSegment(SubtitleSegment<'a>)
DisplayMessage(DisplayMessage)
SceneEndMark(SceneEndMark)
SceneDoneMessage(SceneDoneMessage)
SceneControl(SceneControl)
SubtitleDownload(SubtitleDownload<'a>)
FlushDownload(FlushDownload)
DownloadReply(DownloadReply)
CommsCmd(CommsCmd<'a>)
ConnectionDescriptor(ConnectionDescriptor<'a>)
CommsReply(CommsReply)
CommsSend(CommsSend<'a>)
CommsRcv(CommsRcv<'a>)
Unknown
An apdu_tag with no typed implementation; the fields are the
raw 3-byte tag and the verbatim body bytes (the length_value
bytes that followed the length_field).
Implementations§
Source§impl<'a> AnyApdu<'a>
impl<'a> AnyApdu<'a>
Sourcepub const DISPATCHED_TAGS: &'static [ApduTag]
pub const DISPATCHED_TAGS: &'static [ApduTag]
Every apdu_tag the generated dispatcher routes (excludes
AnyApdu::Unknown).
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Diagnostic SCREAMING_SNAKE name of the contained object
(ApduDef::NAME); "UNKNOWN" for
AnyApdu::Unknown.
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self>
pub fn parse(bytes: &'a [u8]) -> Result<Self>
Parse a complete APDU (header + body) by routing on its 3-byte
apdu_tag. Unrecognised tags yield AnyApdu::Unknown.
Trait Implementations§
impl<'a> Eq for AnyApdu<'a>
Source§impl<'a> From<ApplicationInfo<'a>> for AnyApdu<'a>
impl<'a> From<ApplicationInfo<'a>> for AnyApdu<'a>
Source§fn from(v: ApplicationInfo<'a>) -> Self
fn from(v: ApplicationInfo<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ApplicationInfoEnq> for AnyApdu<'a>
impl<'a> From<ApplicationInfoEnq> for AnyApdu<'a>
Source§fn from(v: ApplicationInfoEnq) -> Self
fn from(v: ApplicationInfoEnq) -> Self
Converts to this type from the input type.
Source§impl<'a> From<AskRelease> for AnyApdu<'a>
impl<'a> From<AskRelease> for AnyApdu<'a>
Source§fn from(v: AskRelease) -> Self
fn from(v: AskRelease) -> Self
Converts to this type from the input type.
Source§impl<'a> From<CaPmtReply> for AnyApdu<'a>
impl<'a> From<CaPmtReply> for AnyApdu<'a>
Source§fn from(v: CaPmtReply) -> Self
fn from(v: CaPmtReply) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ClearReplace> for AnyApdu<'a>
impl<'a> From<ClearReplace> for AnyApdu<'a>
Source§fn from(v: ClearReplace) -> Self
fn from(v: ClearReplace) -> Self
Converts to this type from the input type.
Source§impl<'a> From<CommsReply> for AnyApdu<'a>
impl<'a> From<CommsReply> for AnyApdu<'a>
Source§fn from(v: CommsReply) -> Self
fn from(v: CommsReply) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ConnectionDescriptor<'a>> for AnyApdu<'a>
impl<'a> From<ConnectionDescriptor<'a>> for AnyApdu<'a>
Source§fn from(v: ConnectionDescriptor<'a>) -> Self
fn from(v: ConnectionDescriptor<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<DateTimeEnq> for AnyApdu<'a>
impl<'a> From<DateTimeEnq> for AnyApdu<'a>
Source§fn from(v: DateTimeEnq) -> Self
fn from(v: DateTimeEnq) -> Self
Converts to this type from the input type.
Source§impl<'a> From<DisplayControl> for AnyApdu<'a>
impl<'a> From<DisplayControl> for AnyApdu<'a>
Source§fn from(v: DisplayControl) -> Self
fn from(v: DisplayControl) -> Self
Converts to this type from the input type.
Source§impl<'a> From<DisplayMessage> for AnyApdu<'a>
impl<'a> From<DisplayMessage> for AnyApdu<'a>
Source§fn from(v: DisplayMessage) -> Self
fn from(v: DisplayMessage) -> Self
Converts to this type from the input type.
Source§impl<'a> From<DisplayReply> for AnyApdu<'a>
impl<'a> From<DisplayReply> for AnyApdu<'a>
Source§fn from(v: DisplayReply) -> Self
fn from(v: DisplayReply) -> Self
Converts to this type from the input type.
Source§impl<'a> From<DownloadReply> for AnyApdu<'a>
impl<'a> From<DownloadReply> for AnyApdu<'a>
Source§fn from(v: DownloadReply) -> Self
fn from(v: DownloadReply) -> Self
Converts to this type from the input type.
Source§impl<'a> From<FlushDownload> for AnyApdu<'a>
impl<'a> From<FlushDownload> for AnyApdu<'a>
Source§fn from(v: FlushDownload) -> Self
fn from(v: FlushDownload) -> Self
Converts to this type from the input type.
Source§impl<'a> From<KeypadControl> for AnyApdu<'a>
impl<'a> From<KeypadControl> for AnyApdu<'a>
Source§fn from(v: KeypadControl) -> Self
fn from(v: KeypadControl) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ProfileChange> for AnyApdu<'a>
impl<'a> From<ProfileChange> for AnyApdu<'a>
Source§fn from(v: ProfileChange) -> Self
fn from(v: ProfileChange) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ProfileEnq> for AnyApdu<'a>
impl<'a> From<ProfileEnq> for AnyApdu<'a>
Source§fn from(v: ProfileEnq) -> Self
fn from(v: ProfileEnq) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SceneControl> for AnyApdu<'a>
impl<'a> From<SceneControl> for AnyApdu<'a>
Source§fn from(v: SceneControl) -> Self
fn from(v: SceneControl) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SceneDoneMessage> for AnyApdu<'a>
impl<'a> From<SceneDoneMessage> for AnyApdu<'a>
Source§fn from(v: SceneDoneMessage) -> Self
fn from(v: SceneDoneMessage) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SceneEndMark> for AnyApdu<'a>
impl<'a> From<SceneEndMark> for AnyApdu<'a>
Source§fn from(v: SceneEndMark) -> Self
fn from(v: SceneEndMark) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SubtitleDownload<'a>> for AnyApdu<'a>
impl<'a> From<SubtitleDownload<'a>> for AnyApdu<'a>
Source§fn from(v: SubtitleDownload<'a>) -> Self
fn from(v: SubtitleDownload<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SubtitleSegment<'a>> for AnyApdu<'a>
impl<'a> From<SubtitleSegment<'a>> for AnyApdu<'a>
Source§fn from(v: SubtitleSegment<'a>) -> Self
fn from(v: SubtitleSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for AnyApdu<'a>
impl<'a> PartialEq for AnyApdu<'a>
Source§impl Serialize for AnyApdu<'_>
impl Serialize for AnyApdu<'_>
Source§type Error = Error
type Error = Error
The error type this implementer returns (usually the same as the
corresponding
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Number of bytes
serialize_into will write.impl<'a> StructuralPartialEq for AnyApdu<'a>
Auto Trait Implementations§
impl<'a> Freeze for AnyApdu<'a>
impl<'a> RefUnwindSafe for AnyApdu<'a>
impl<'a> Send for AnyApdu<'a>
impl<'a> Sync for AnyApdu<'a>
impl<'a> Unpin for AnyApdu<'a>
impl<'a> UnsafeUnpin for AnyApdu<'a>
impl<'a> UnwindSafe for AnyApdu<'a>
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