Crate kwap_msg[−][src]
Expand description
kwap_msg
Low-level representation of CoAP messages.
alloc
vs no_alloc
kwap_msg implements CoAP messages as either backed by:
alloc
: dynamically growable heap-allocated buffersno_alloc
: static stack-allocated buffers
alloc::Message
can be much easier to use and performs comparably to no_alloc
, however it does require:
std
or a global allocator
Performance
This crate uses criterion
to measure performance of the heaped & heapless implementations in this crate as well as coap_lite::Packet
.
In general, kwap_msg::alloc::Message
is faster than coap_lite, which is much faster than no_alloc::Message
.
Benchmarks:
Serializing to bytes
Deserializing from bytes
Modules
Enums
Errors encounterable while parsing a message from bytes
Errors encounterable while parsing an option from bytes
Traits
Get the runtime size (in bytes) of a struct
Trait for converting a sequence of bytes into some data structure
Trait allowing fallible conversion into bytes