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:
MessageBuffer(e.g.SliceBuffer)MessageBufferMut(e.g.SliceBufferMut)
Structs§
- BoxBuffer
alloc - An owned (heap allocated) CoAP message buffer.
- Lifetimes
Matter Little - Marker that indicates that all lifetimes in
Tare 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.
- Message
Mut - A CoAP message that resides in contiguous mutable memory.
- Message
Option - A simple
coap_message::MessageOptionimplementation for memory-mapped CoAP messages - Options
Iter - An iterator producing
MessageOptions by running along an encoded CoAP message options stream by using aOptPayloadReaderand discarding the payload. - Parsing
Error - Error type indicating a malformed CoAP message.
- Slice
Buffer - An implementation of
MessageBufferaround a slice of memory. - Slice
Buffer Mut - The easiest implementation of
MessageBufferMutthat is backed by exclusive references.
Enums§
- Write
Error - Error type for manipulation of
MessageMutmutable 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§
- Message
Buffer - A trait that can implemented on in-memory encoded CoAP messages; then, an
Messagestruct can be placed around the implementer to implementReadableMessage. - Message
Buffer Mut - Data backing a
MessageMut.