coap-message 0.0.3

Interface to CoAP messages
Documentation
#![no_std]
//! CoAP mesage abstraction
//!
//! This crate defines interfaces for readable and writable CoAP messages. Thus, it allows CoAP
//! servers (and possibly clients) to be written independent of the actual CoAP library that is
//! used to serialize and deserialize the messages to the protocol.
//!
//! It also provides some simple types that can help users and library implementers to not repeat
//! the same registered names all again.
//!
//! Error handling
//! --------------
//!
//! The readable message types are designed with minimal fallability -- for example, iterating over
//! the options can not raise a "premature end of message" style error. This encodes the concept
//! that having a message type implies validity of the message. It is backed by currently used
//! libraries (RIOT's Gcoap, jnet-coap) performing the necessary validation steps when constructing
//! message objects.
//!
//! Whether this is a good idea remains to be seen.
//!
//! Libraries that insist on minimizing the cycles spent parsing can opt to present invalid
//! messages in truncated form, but need to be aware that this has important security implications.

mod message;
mod numbers;

pub use message::{
    MessageOption, MinimalWritableMessage, MutableWritableMessage, ReadableMessage,
    SeekWritableMessage, WithSortedOptions,
};

pub use numbers::{Code, OptionNumber};

#[cfg(feature = "typenum_test")]
mod typenum_test;

// mod jnet_impl;
// mod inbuffer;

// mod test;