pub trait PDU {
    fn serialise(&self, buf: &mut BytesMut);
    fn deserialise(buffer: BytesMut) -> Result<Self, DISError>
    where
        Self: Sized
; }
Expand description

Trait to denote a PDU.

Required Methods

Fills a BytesMut struct with a PDU serialised into binary. This buffer is then ready to be sent via UDP to the simluation network.

Creates a PDU from a BytesMut struct.

Implementors