Module io

Module io 

Source
Expand description

Transport-agnostic line I/O for the CLI.

Split into two halves — CliInput for line-by-line reading, and CliOutput for writing + flushing. Splitting the halves lets the CliSession::run loop hold a long-lived read future across select! iterations while the session simultaneously uses the output half to service inbound events. A unified trait would force the read future to borrow the whole transport, blocking concurrent writes.

Structs§

StdioInput
Tokio-based stdin reader.
StdioOutput
Tokio-based stdout writer.

Traits§

CliInput
Line-reading half of the CLI transport.
CliOutput
Line-writing half of the CLI transport.

Functions§

stdio_split
Construct the stdin/stdout halves for the CLI.