pub fn message_prefix(buf: &[u8]) -> Option<MessagePrefix>Expand description
Read the header and token of a datagram without touching its options or payload.
None when the bytes are not a CoAP message at all by the parts this reads — too
short, wrong version, a reserved token length, or a token that runs off the end. In
that case there is nothing to echo and no reply can be matched to anything.