coap-lite
A lightweight, #![no_std]
CoAP message manipulation crate, ideal for
embedded environments.
It's based on the improved low-level message handling code from the coap crate, made to work in bare metal environments.
Overview
This crate provides several types that can be used to build, modify and encode/decode CoAP messages to/from their byte representation.
It does require allocation, so you might have to set a global allocator depending on your target.
Usage
use ;
let mut request = new;
request.header.message_id = 23839;
request.header.code = Request;
request.set_token;
request.add_option;
request.add_option;
assert_eq!;
let response = from_bytes
.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
License
Licensed under either of
at your option.
This is a modification of the coap crate, its license is in LICENSE-3RD-PARTY.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.