Crate coap_numbers

source ·
Expand description

This crate primarily contains constants for the CoAP Protocol, as maintained in the CoRE Parameters registry at IANA.

In addition to the constants themselves, it provides functions to get their names and extractable properties.

This crate tries not to be opinionated in terms of types: It uses the Rust types that reflect the possible ranges of the registry, but does not attempt to create suitable newtypes or enums for the constants. That is left to downstream libraries, as they can best judge whether they need to represent values that are unrecognized anyway.

§Features

The only optional feature is alloc, which is opt-in. It adds functions that return a String; those typically have formatter based functions they point to for replacement.

Modules§

  • Constants and functions for CoAP codes
  • Functions for accessing CoAP Content Format numbers
  • Constants and functions for CoAP options
  • Constants for OSCORE flag bits
  • Constants and functions for options in signaling CoAP messages (7.xx)