Crate ailloli_ui_terminal_pty

Source
Expand description

PTY runtime contracts and backends for Ailloli UI terminals.

This crate is intentionally separate from ailloli_ui_terminal_core: it owns system I/O only. It does not parse ANSI, render widgets, or integrate with application-specific UI. The default feature set provides models, batching, a handle abstraction, and an in-memory mock without opening OS resources. Feature portable adds the native PortablePtyBackend with detached worker threads and unbounded queues documented on that feature-gated type.

§Examples

use ailloli_ui_terminal_pty::{MockPtyBackend, PtyBackend, PtyEvent, PtySpawnConfig};
let backend = MockPtyBackend::default();
backend.push_event(PtyEvent::Output(b"ready".to_vec()));
let handle = backend.spawn(PtySpawnConfig::default()).unwrap();
assert_eq!(handle.drain_events(), vec![PtyEvent::Output(b"ready".to_vec())]);

Structs§

MockPtyBackend
Cloneable mock backend with one shared recording state.
PortablePtyBackend
Native [portable_pty] backend with configurable output batching.
PtyBatchConfig
Flush thresholds for PtyOutputBatcher.
PtyExitStatus
Backend-reported process completion.
PtyHandle
Clonable, thread-safe capability for one erased PTY session.
PtyOutputBatcher
Single-threaded accumulator producing ordered PtyEvent::Output batches.
PtySize
PTY character-grid and optional pixel dimensions.
PtySpawnConfig
Backend-neutral child process and PTY spawn configuration.

Enums§

PtyError
Failure returned by PTY abstraction operations.
PtyEvent
Event delivered asynchronously by a PTY session.

Traits§

PtyBackend
Factory for backend-specific PTY sessions.