Skip to main content

Crate cmw

Crate cmw 

Source
Expand description

Rust implementation of the RATS Conceptual Message Wrapper (CMW).

Re-exports§

pub use cmw::Error;
pub use cmw::Kind;
pub use cmw::CMW;
pub use collection::Collection;
pub use indicator::Indicator;
pub use monad::Monad;
pub use type::Type;

Modules§

cfmap
cmw
Root CMW type: either Monad or Collection, with sniffing and unified Deserialize/Serialize.
collection
Collection CMW: map of keys → nested CMW, with optional “__cmwc_t” type.
indicator
Indicator bit‐map implementation (flags for ReferenceValues, Endorsements, etc.)
monad
Monad CMW: record or CBOR Tag, with JSON/CBOR (de)serialization.
tn
CBOR Tag Number (TN)/Content Format (CF) conversion as per RFC 9277 (CoAP ↔ CBOR Tag mapping).
type
Type wrapper (media type string or numeric CF), with JSON/CBOR serialization and TN/CF mapping.
utils
Utility functions: URI/OID validation, JSON/CBOR detection, hex decoding.
value
Value wrapper around a byte vector, with base64‐URL‐safe JSON <-> byte[] mapping.
x509_ext
X.509 Extension encoding/decoding of wrapped CMW (OID 1.3.6.1.5.5.7.1.35).

Structs§

Mime
A parsed mime or media type.