Skip to main content

Module inmemory

Module inmemory 

Source
Expand description

Implementations of coap_message traits based on a serialized messages.

The main structs of this modules are:

They give access to the CoAP message semantics through the ReadableMessage and MinimalWritableMessage / MutableWritableMessage traits. Its data is stored in buffers defined in this module, which can be thought of as mostly an AsRef<[u8]> / AsMut (i.e., data that can be owned or borrowed), but with a separate code and options-and-payloads bytes:

Structs§

BoxBufferalloc
An owned (heap allocated) CoAP message buffer.
LifetimesMatterLittle
Marker that indicates that all lifetimes in T are just relevant for the type itself, but not for interactions. In particular, constructing it promises that:
Message
A CoAP message that resides in contiguous readable memory.
MessageMut
A CoAP message that resides in contiguous mutable 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.
ParsingError
Error type indicating a malformed CoAP message.
SliceBuffer
An implementation of MessageBuffer around a slice of memory.
SliceBufferMut
The easiest implementation of MessageBufferMut that is backed by exclusive references.

Enums§

WriteError
Error type for manipulation of MessageMut mutable messages.

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§

MessageBuffer
A trait that can implemented on in-memory encoded CoAP messages; then, an Message struct can be placed around the implementer to implement ReadableMessage.
MessageBufferMut
Data backing a MessageMut.