[][src]Trait coap_message::MessageOption

pub trait MessageOption {
    fn number(&self) -> u16;
fn value(&self) -> &[u8]; }

Iteration item for option values

An implementation needs to allow the user to get the value as a memory slice. This is trivial for messages that are stored in serialized form. Implementations that store options semantically (eg. as a struct Block { n: usize, m: bool, szx: u8 }) will typically make their MessageOption large enough to contain serialized options, or heap-allocate for them.

Required methods

fn number(&self) -> u16

fn value(&self) -> &[u8]

Loading content...

Implementors

Loading content...