[][src]Trait coap_message::ReadableMessage

pub trait ReadableMessage<'a> {
    type Code: Code;
    type MessageOption: 'a + MessageOption;
    type OptionsIter: Iterator<Item = Self::MessageOption>;
    fn code(&self) -> Self::Code;
fn payload(&self) -> &[u8];
fn options(&'a self) -> Self::OptionsIter; }

Associated Types

Loading content...

Required methods

fn code(&self) -> Self::Code

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

fn options(&'a self) -> Self::OptionsIter

Produce all options in arbitrary order as an iterator

If your options are always produced in an ordered fashion, consider implementing the WithSortedOptions trait as well. This should be the case for most CoAP message backends. Examples of backends where it is not implemented are single-pass reads over in-place decrypted OSCORE messages.

Loading content...

Implementors

Loading content...