pub fn encode(source: u16, destination: u16, apdu: &[u8]) -> Vec<u8> ⓘExpand description
Builds a complete wrapper PDU (header + APDU).
§Panics
Panics (debug builds only) if apdu exceeds 65535 octets: the wrapper
header’s length field (IEC 62056-47) is 16 bits wide, and callers are
expected to keep APDUs under the negotiated max-PDU size (a few KB at
most in this crate) via GET/SET-WITH-DATABLOCK segmentation.