Expand description
Tools for using a coap-message
This crate contains extension traits and other tools that are useful when working with items that implement the coap_message trait.
§Feature flags
§Details of the Error struct
Without these, the Error struct is just a code u8.
-
error_unprocessed_coap_option
— Allow storing the RFC9290 “Unprocessed CoAP option” problem detail in Bad Option errors, and emit it in CBOR payloads. If this feature is not enabled, any such detail provided in errors is silently not emitted. -
error_request_body_error_position
— Allow storing the RFC9290 “Request Body Error Position” problem detail in Bad Request errors, and emit it in CBOR payloads. If this feature is not enabled, any such detail provided in errors is silently not emitted. -
error_max_age
— Store a Max-Age of the error. The method [Error::with_max_age()] is only available when this feature is enabled. -
error_title
— Store and render the title of the error (for use as a diagnostic payload or as RFC9290 “Title” problem detail). If this feature is not enabled, any such detail provided in errors is silently not emitted.The detail is also stored under certain debugging conditions (currently associated with
debug_assert
, but the condition may change) for the mere benefit of enhancing theDebug
implementation’s usability.When other details are present (so that RFC9290 format is used), the title is only shown if the underlying message provides promotion to a MutableWritableMessage (as is the case with many implementations), otherwise it is omitted for lack of an unbounded buffer to render the message in.
-
defmt_0_3
— Derive [defmt::Format
][defmt_0_3::Format] 0.3 forError
Modules§
- Traits and types that represent serializations of options in encoded options
Structs§
- A build-time-flexible renderable error type
Traits§
- Extensions implemented for any MessageOption iterator to enable simple and direct use
- Extension trait providing utility functions on coap_message::Code.
- Extension trait providing utility functions on coap_message::ReadableMessage.