Expand description
RDW (Record Descriptor Word) header primitives.
This crate intentionally focuses on one concern: parsing and constructing RDW framing metadata plus minimal buffered helpers.
The RDW format prefixes each variable-length record with a 4-byte header
(2-byte big-endian payload length + 2 reserved bytes). Use RDWRecordReader
and RDWRecordWriter for streaming record I/O, or the lower-level helpers
(rdw_read_len, rdw_slice_body) for custom framing.
Structs§
- RDWRecord
- An RDW record with header and payload bytes.
- RDWRecord
Reader - RDW (Record Descriptor Word) record reader for variable-length records.
- RDWRecord
Writer - RDW record writer for variable-length records.
- RdwHeader
- Parsed RDW header (
length + reserved).
Constants§
- RDW_
HEADER_ LEN - Size of an RDW header in bytes.
- RDW_
MAX_ PAYLOAD_ LEN - Maximum payload size representable in RDW (
u16::MAX).
Functions§
- rdw_
is_ suspect_ ascii_ corruption - Heuristic to detect ASCII-corrupted RDW headers.
- rdw_
payload_ len_ to_ u16 - Convert payload length to
u16with RDW error mapping. - rdw_
read_ len - Read a 2-byte big-endian RDW body length and consume those two bytes.
- rdw_
slice_ body - Borrow the RDW body slice for
lenbytes without consuming. - rdw_
try_ peek_ len - Probe if enough bytes exist to attempt RDW length parsing.
- rdw_
validate_ and_ finish - Placeholder for future RDW body validation hooks.