Expand description
Streaming I/O — file and TCP sources/sinks, byte framing, compression, and std::io bridges.
All operators here speak Vec<u8> chunks and compose with the linear Source/Flow/Sink
DSL. The surface is:
- File I/O — synchronous
FileIO(on the Datum thread pool) and Tokio-backedTokioFileIO; optional io_uring-backedUringFileIObehind theio-uring-filefeature. - TCP —
TokioTcpserver (TokioTcp::bind) and client (TokioTcp::outgoing_connection) byte streams. TLS, UDP, and QUIC live indatum-net. - Framing —
Framing: delimiter, length-field, and JSON-object framing. - Compression —
Compression: gzip/gunzip and deflate/inflate, in-process viaflate2. std::iobridges —StreamConvertersadapts blockingstd::io::Read/Writeto/from Datum streams, and materializes blockingInputStreamHandle/OutputStreamHandlehandles.
See io/AGENTS.md for invariants, hot paths, and the Akka mapping.
Structs§
- Compression
- In-process byte-stream (de)compression flows backed by
flate2. Mirrors Akka’sCompression. - FileIO
- Synchronous, low-overhead file source and sink, backed by
StreamConvertersoverstd::fs::File. Mirrors Akka’sFileIO; seesuper::TokioFileIOfor the async variant. - Framing
- Byte-stream framing flows: turn a stream of arbitrary
Vec<u8>chunks into a stream of complete logical frames. Mirrors Akka’sFraming/JsonFraming. - Input
Stream Handle - A blocking
std::io::Readhandle materialized byStreamConverters::as_input_stream. - IoResult
- Akka-style materialized IO result for Tokio-backed file and TCP byte streams.
- Output
Stream Handle - A blocking
std::io::Writehandle materialized byStreamConverters::as_output_stream. - Stream
Converters - Bridges between
std::io::Read/Writeand Datum byte streams. Mirrors Akka’sStreamConverters. - TcpBinding
- The bound address of a TCP listener, available as the materialized value of
TokioTcp::bindas soon as the listener is bound — before any connection is accepted. - TcpConnection
- Address metadata for an established TCP connection, carried as the materialized value of
TokioTcp::outgoing_connectionand accessible from aTcpIncomingConnection. - TcpIncoming
Connection - A TCP connection accepted by
TokioTcp::bind. - Tokio
FileIO - Tokio
Tcp
Enums§
- Framing
Byte Order - Byte order used by
Framing::length_fieldto interpret the length header.
Type Aliases§
- Tokio
Byte Sink - A byte sink whose materialized value resolves to an
IoResult(bytes + terminal status). - Tokio
Byte Source - A byte source whose materialized value resolves to an
IoResult(bytes + terminal status).