Expand description
PTY-backed process APIs.
Re-exports§
Modules§
- backend
- Cross-platform PTY backend traits and platform-selected implementations. PTY backend abstraction (#150).
- reexports
- Re-exports for downstream crates that need portable-pty types.
- terminal_
input - Native terminal input capture and translation helpers.
Structs§
- Idle
Detector Core - Core idle detection logic, shareable across threads via Arc.
The reader thread calls
record_outputdirectly. - Idle
Monitor State - Shared mutable state for idle detection waits.
- Interactive
PtyOptions - Re-exported native PTY process and interactive session types. Safe defaults for a real interactive PTY session.
- Interactive
PtyPump Result - Re-exported native PTY process and interactive session types. Output collected by one interactive PTY pump operation.
- Interactive
PtySession - Re-exported native PTY process and interactive session types. Canonical interactive PTY recipe for downstream Rust consumers.
- Native
PtyHandles - Platform-neutral handles for a running native PTY child.
- Native
PtyProcess - Re-exported native PTY process and interactive session types. Low-level native pseudo-terminal process wrapper.
- PtyRead
Shared - Shared reader state paired with a condition variable for waiters.
- PtyRead
State - Buffered output and close state for a PTY reader thread.
Enums§
- PtyError
- Errors returned by pseudo-terminal process operations.
Functions§
- command_
builder_ from_ argv - Build a
portable_pty::CommandBuilderfrom an argv vector. - control_
churn_ bytes - Count ANSI/control bytes that should not be treated as visible output.
- input_
contains_ newline - Return whether input bytes contain a carriage return or newline.
- is_
ignorable_ process_ control_ error - Return whether a process-control error can be ignored during cleanup.
- poll_
pty_ process - Poll the PTY child process and persist its return code after exit.
- portable_
exit_ code - Convert a
portable_ptyexit status into this crate’s signed exit-code convention. - record_
pty_ input_ metrics - Record PTY input byte, newline, and submit counters for one input chunk.
- spawn_
pty_ reader - Spawn the background reader that drains PTY output into shared state.
- store_
pty_ returncode - Store the PTY child return code in shared process state.
- write_
pty_ input - Write input bytes to the running PTY after platform-specific translation.