Module inmemory

Source
Expand description

Implementation of coap_message::ReadableMessage based on a serialized message

Message is the main struct of this module – if the message is available as a slice that lives as long as the message, that’s the type to use. Otherwise, implement EncodedMessage on your data, and wrap it in an EncodedMessageView. (The Message is nothing else than the options/payload slice plus the code in a struct).

Note that the crate::inmemory_write has a similar mechanism but does without an equivalent “view”; at the next breaking revision, those might be unified.

Structs§

EncodedMessageView
A wrapper around any data structure containing a readable message
Message
A CoAP message that resides in contiguous readable memory
MessageOption
A simple coap_message::MessageOption implementation for memory-mapped CoAP messages
OptionsIter
An iterator producing MessageOptions by running along an encoded CoAP message options stream by using a OptPayloadReader and discarding the payload.

Constants§

OPTION_INVALID
Option value used by this library to indicate a format error in the message that was not detected by the time option / payload processing was started.

Traits§

EncodedMessage
A trait that can implemented on in-memory encoded messages; then, an EncodedMessageView struct can be placed around the implementer to implement coap_message::ReadableMessage.