Expand description
Canonical host/guest input wire format.
The input stream is encoded as u32 words where:
- the first word stores payload byte length,
- each following word stores up to 4 payload bytes in big-endian order,
- the final word is zero-padded when payload length is not a multiple of 4.
Structs§
- EndOf
Frame - Error from
FramedRead::read: the frame ran out before the request could be satisfied.shortfallis how many more bytes were requested than the frame still holds; on this error the reader is left unadvanced. - Framed
Reader - Streaming counterpart to
read_framed_bytes_with: aFramedReadsource that pulls framed words on demand instead of first materializing the whole payload into aVec<u8>. Only a single word is buffered at a time, so it holds O(1) memory regardless of payload size — letting a decoder run at ~1x peak memory rather than the ~2x of “buffer the blob, then decode it”.
Enums§
- Wire
Error - Errors that can occur while framing input payloads.
Traits§
- Framed
Read - A source of framed payload bytes read on demand. This keeps the framing and
word-transport concern in
core, decoupled from any serializer — a bincode bridge overFramedReadlives in the codec crate, socoreneeds no dependency on bincode.
Functions§
- frame_
words_ from_ bytes - Frame payload bytes into input words consumed by the runtime.
- read_
framed_ bytes_ with - Read one framed payload from a word source.