pub struct SacMessage<'a> {
pub datatypes: Vec<SacDatatype<'a>>,
}Expand description
A SAC protocol message (§6.4.3.3, Tables 9-13): the ordered loop of datatypes
carried inside a cc_sac_data_req / cc_sac_data_cnf envelope. The envelope
APDU itself (9F9007/9F9008) defers to CI Plus V1.3, so this models only the
datatype loop content.
Fields§
§datatypes: Vec<SacDatatype<'a>>The ordered datatypes (the send/request datatype loop content).
Implementations§
Source§impl<'a> SacMessage<'a>
impl<'a> SacMessage<'a>
Sourcepub fn parse(body: &'a [u8]) -> Result<Self>
pub fn parse(body: &'a [u8]) -> Result<Self>
Parse a contiguous SAC datatype loop (datatype_nbr entries are inferred
from the buffer; the buffer must contain exactly whole datatypes).
Sourcepub fn serialized_len(&self) -> usize
pub fn serialized_len(&self) -> usize
Serialized length of the whole datatype loop.
Sourcepub fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
pub fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serialize the datatype loop into buf, returning the bytes written.
Trait Implementations§
Source§impl<'a> Clone for SacMessage<'a>
impl<'a> Clone for SacMessage<'a>
Source§fn clone(&self) -> SacMessage<'a>
fn clone(&self) -> SacMessage<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SacMessage<'a>
impl<'a> Debug for SacMessage<'a>
impl<'a> Eq for SacMessage<'a>
Source§impl<'a> PartialEq for SacMessage<'a>
impl<'a> PartialEq for SacMessage<'a>
Source§impl<'a> Serialize for SacMessage<'a>
Available on crate feature serde only.
impl<'a> Serialize for SacMessage<'a>
Available on crate feature
serde only.impl<'a> StructuralPartialEq for SacMessage<'a>
Auto Trait Implementations§
impl<'a> Freeze for SacMessage<'a>
impl<'a> RefUnwindSafe for SacMessage<'a>
impl<'a> Send for SacMessage<'a>
impl<'a> Sync for SacMessage<'a>
impl<'a> Unpin for SacMessage<'a>
impl<'a> UnsafeUnpin for SacMessage<'a>
impl<'a> UnwindSafe for SacMessage<'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