Trait burble_crypto::Codec

source ·
pub trait Codec: Sized {
    // Required methods
    fn pack(&self, p: &mut Packer<'_>);
    fn unpack(p: &mut Unpacker<'_>) -> Option<Self>;
}
Expand description

Codec for packing and unpacking SMP command parameters.

Required Methods§

source

fn pack(&self, p: &mut Packer<'_>)

Packs command parameters into an SMP PDU.

source

fn unpack(p: &mut Unpacker<'_>) -> Option<Self>

Unpacks command parameters from an SMP PDU.

Implementations should only return None if one of the unpacked values cannot be decoded. The final Unpacker status is checked by the caller.

Implementors§