[][src]Function async_coap::message::codec::decode_option

pub fn decode_option<'a>(
    iter: &mut Iter<'a, u8>,
    last_option: OptionNumber
) -> Result<Option<(OptionNumber, &'a [u8])>, Error>

Decodes one option from a core::slice::Iter, which can be obtained from a byte slice. The iterator is then advanced to the next option.

Will return Ok(None) if it either encounters the end-of-options marker (0xFF) or if the given iterator has been fully consumed.