cbor_nan_bstr/
lib.rs

1//! A CBOR Tag for Lossless Transport of IEEE‑754 NaN Bit Patterns
2//! Implements draft‑mcnally‑cbor‑nan‑bstr semantics for dCBOR.
3//!
4//! This module defines a `NanBstr` tagged value that carries the exact
5//! bit pattern of an IEEE‑754 NaN in a CBOR byte string, tagged with 102.
6//!
7//! The enclosed byte string MUST be exactly 2, 4, 8, or 16 bytes long and is
8//! interpreted in network byte order (big‑endian). Its bits MUST encode
9//! a NaN for the corresponding interchange width; no canonicalization of
10//! sign, quiet/signaling, payload, or width is performed here.
11//!
12//! NOTE: This includes **binary128 (f128)** support without using any native
13//! `f128` type: APIs accept/return raw bit patterns as `u128` or `[u8; 16]`.
14
15mod nan_bstr;
16pub use nan_bstr::*;
17mod nan_width;
18pub use nan_width::*;
19mod error;
20pub use error::*;