Skip to main content

lace_sans_io/iltp/
mod.rs

1//! ILTP byte codec and stream encodings.
2//!
3//! The codec owns raw session prefaces and their offers, canonical item
4//! framing, partial bytes, hard framing caps, and EOF truncation. Below the
5//! item framing, the stream layer applies each direction's 065 encoding,
6//! selected from the two prefaces of every logical session. Semantic
7//! authority, establishment, round, and control-family validation belong to
8//! `core::SessionMachine`.
9
10mod codec;
11mod control;
12#[cfg(test)]
13pub(crate) use codec::test_support;
14mod encoded_stream;
15mod framing;
16mod output;
17mod stream_encoding;
18
19#[cfg(test)]
20mod correctness_tests;
21
22pub use codec::{DEFAULT_CHUNK_BYTES, Decoded, IltpCodec, MIN_CHUNK_BYTES, canonical_item_size};
23pub use control::{
24    CHANGE_LINE_BYTES, EMPTY_LISTING_BYTES, ListingForm, ListingRow, OFFER_LINE_BYTES,
25    RESPONSE_FRAMING_BYTES, ROUND_END_BYTES, RecordLabel, entry_len,
26};
27#[cfg(any(test, feature = "internal"))]
28#[doc(hidden)]
29pub use framing::encode_item;
30pub use framing::{
31    ITEM_MAX_BYTES, IltpError, IltpItem, IltpTruncation, PORT_MAX_BYTES, PortText,
32    SESSION_PREFACE_MAX_BYTES, SessionNonceText, SessionPreface,
33};
34pub use output::{OutputBytes, RecordRead};
35pub use stream_encoding::{
36    DecodeProgress, ENCODE_MIN_OUTPUT, EncodeMode, EncodeProgress, STREAM_ENCODING_DICTIONARY,
37    StreamDecoder, StreamEncoder, StreamEncoding, StreamEncodingError, StreamOffers,
38};