pub trait DataLinkLayer {
// Required methods
fn send_apdu(&mut self, apdu: &[u8]) -> Result<()>;
fn receive_apdu(&mut self) -> Result<Vec<u8>>;
// Provided method
fn client_sap(&self) -> Option<u8> { ... }
}Expand description
A data link / framing sub-layer that carries xDLMS APDUs.
Implemented by the HDLC and wrapper sub-layers.
Required Methods§
Sourcefn receive_apdu(&mut self) -> Result<Vec<u8>>
fn receive_apdu(&mut self) -> Result<Vec<u8>>
Receives and de-frames one APDU.
Provided Methods§
Sourcefn client_sap(&self) -> Option<u8>
fn client_sap(&self) -> Option<u8>
Client SAP learned from the data-link peer address, when known.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".