pub struct WrapperHeader {
pub version: u16,
pub source: u16,
pub destination: u16,
pub length: u16,
}Expand description
The 8-octet wrapper header.
Fields§
§version: u16Protocol version (always WRAPPER_VERSION).
source: u16Source wPort (the sender’s SAP).
destination: u16Destination wPort (the receiver’s SAP).
length: u16Length of the APDU that follows the header.
Implementations§
Source§impl WrapperHeader
impl WrapperHeader
Sourcepub fn decode(bytes: &[u8]) -> Result<WrapperHeader, WrapperError>
pub fn decode(bytes: &[u8]) -> Result<WrapperHeader, WrapperError>
Parses a header from the first 8 octets of bytes.
Trait Implementations§
Source§impl Clone for WrapperHeader
impl Clone for WrapperHeader
Source§fn clone(&self) -> WrapperHeader
fn clone(&self) -> WrapperHeader
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 moreimpl Copy for WrapperHeader
Source§impl Debug for WrapperHeader
impl Debug for WrapperHeader
impl Eq for WrapperHeader
Source§impl PartialEq for WrapperHeader
impl PartialEq for WrapperHeader
impl StructuralPartialEq for WrapperHeader
Auto Trait Implementations§
impl Freeze for WrapperHeader
impl RefUnwindSafe for WrapperHeader
impl Send for WrapperHeader
impl Sync for WrapperHeader
impl Unpin for WrapperHeader
impl UnsafeUnpin for WrapperHeader
impl UnwindSafe for WrapperHeader
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