pub struct RawApdu {
pub tag: u8,
pub body: Vec<u8>,
}Expand description
A raw APDU with an arbitrary tag and body.
This type allows sending and receiving APDUs without parsing their content, which is useful for manufacturer-specific or extension APDUs.
Fields§
§tag: u8The APDU tag byte.
body: Vec<u8>The raw body bytes (after the length octet).
Implementations§
Source§impl RawApdu
impl RawApdu
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, ServiceError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ServiceError>
Creates a raw APDU from a complete byte slice (tag + length + body).
Sourcepub fn into_parts(self) -> (u8, Vec<u8>)
pub fn into_parts(self) -> (u8, Vec<u8>)
Consumes the APDU and returns the tag and body.
Trait Implementations§
impl Eq for RawApdu
impl StructuralPartialEq for RawApdu
Auto Trait Implementations§
impl Freeze for RawApdu
impl RefUnwindSafe for RawApdu
impl Send for RawApdu
impl Sync for RawApdu
impl Unpin for RawApdu
impl UnsafeUnpin for RawApdu
impl UnwindSafe for RawApdu
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