Skip to main content

Module transport

Module transport 

Source
Expand description

Transport abstraction.

The TUI event loop sits on top of two I/O concerns:

  1. A [ratatui::backend::Backend] that receives rendered frames.
  2. A source of user input events (keystrokes, terminal resizes).

Both are hidden behind Transport. A local invocation uses LocalTransport, which owns a CrosstermBackend<Stdout> and polls crossterm for events. The SSH daemon will later provide a different impl that writes to a russh channel and reads keystrokes from that channel.

Keeping this layer tiny is deliberate. Anything richer (history, paste handling) grows inside App / Intent, not here.

Re-exports§

pub use local::LocalTransport;

Modules§

local
Local PTY transport.

Enums§

RawEvent
Input events the event loop cares about. Keystrokes, mouse reports and resizes are explicit; disconnect is signalled via Transport::poll returning an io::Error.

Constants§

DEFAULT_CELL_PIXELS
Pixel size of one terminal cell when the client does not report it.
MOUSE_DISABLE
MOUSE_ENABLE
Button events (?1000), motion while a button is held (?1002, ignored by a terminal without it) and SGR coordinates (?1006): what both transports ask the terminal for.

Traits§

Transport
Bridge between the event loop and whatever terminal it talks to.

Functions§

failed_steps
The restore steps that failed, named. Every step has already run: a restore is not short-circuited by an earlier failure.
warn_failed
Logs what a restore in Drop could not do, since it cannot return an error.