Skip to main content

Crate tau_cli_term_raw

Crate tau_cli_term_raw 

Source
Expand description

Terminal prompt with async output support.

Renders directly to the normal terminal buffer (no alternate screen) so the terminal’s native scrollback is preserved. See README.md in this crate for the full rendering strategy.

Three rendering paths (see README.md):

  • Differential update — common case, diffs visible viewport via Screen
  • Scrolling render — on overflow, diffs a suffix rebased at the prior viewport and renders in order; \r\n at the bottom pushes content into scrollback without materializing older hidden history
  • Full render — on resize/invalidation, clears screen + scrollback and replays the capped log/history suffix plus fixed tail without rubber

Structs§

BlockId
Opaque numeric identifier for a StyledBlock.
Candidate
A single completion candidate surfaced by a CompletionSource.
Cell
A terminal cell: one character, its visual style, and display width.
CellRow
One normalized, immutable, cheaply shared physical terminal row.
CompletionAcceptance
A candidate’s whole-buffer replacement and cursor position at acceptance.
CompletionView
Read-only snapshot of the completion menu state.
OpaquePresentationFact
One caller-owned opaque, content-free fact accepted by raw correlation.
OutputSnapshot
Snapshot of terminal output zones, excluding prompt input/history state.
PresentationInvalidation
Named invalidation mask for opaque predecessor keys.
PresentationObservationKey
Validated opaque key used only for caller-owned presentation invalidation.
PriorityLine
A single line that progressively hides lower-importance styled items.
PriorityLinePriority
Nonnegative importance assigned to one independently hideable line item.
PriorityLineTruncation
Display-column bounds for middle truncation of one PriorityLine item.
RedrawSuppressionGuard
Owned redraw-suppression scope that may span multiple renderer calls.
RendererDeliveryId
Identifies one socket delivery as it crosses the CLI renderer pipeline.
Span
A run of text with a uniform style.
Style
Visual attributes for a single character cell.
StyledBlock
A unit of layout: styled content with background, alignment, and margins.
StyledText
A sequence of styled spans representing rich text.
Term
The terminal prompt engine.
TermHandle
A cloneable handle for mutating prompt zones from any thread.
TerminalOptions
Immutable terminal behavior selected before Tau acquires the terminal.
TwoLineElision
Width-adaptive two-row content that preserves leading and trailing excerpts.

Enums§

Align
Horizontal alignment within a block.
Color
Represents a color.
CursorShape
Cursor shape requested for the prompt while Tau owns raw mode.
Event
High-level events surfaced to the downstream event loop.
PriorityLineAlignment
Which edge owns an item in a PriorityLine.
RawEvent
Raw terminal events from crossterm or a virtual test input channel.

Traits§

CompletionSource
Builds the candidate list for the current buffer.

Functions§

is_output_failure
Returns whether an I/O error reports fail-stop of this terminal attachment.
sanitize_hyperlink_target
Rejects targets that could terminate OSC 8 or inject terminal controls.