Skip to main content

Crate render_ansi

Crate render_ansi 

Source

Structs§

IncrementalRenderer
StreamLineRenderer
Incremental renderer for a single mutable line without terminal width assumptions.
StyledSpan

Enums§

ColorMode
RenderError

Functions§

highlight_lines_to_ansi_lines
Highlights line-oriented input and returns ANSI output per line.
highlight_lines_to_ansi_lines_with_highlighter
Highlights line-oriented input with a caller-provided highlighter.
highlight_lines_to_ansi_lines_with_highlighter_and_mode
Highlights line-oriented input with a caller-provided highlighter and color mode.
highlight_lines_to_ansi_lines_with_highlighter_and_mode_and_background
Highlights line-oriented input with caller-provided highlighter, color mode, and background behavior.
highlight_lines_to_ansi_lines_with_mode
Highlights line-oriented input and returns ANSI output per line using a color mode.
highlight_lines_to_ansi_lines_with_mode_and_background
Highlights line-oriented input and returns ANSI output per line with explicit color and background behavior.
highlight_to_ansi
Highlights and renders a source buffer to ANSI output.
highlight_to_ansi_with_highlighter
Highlights and renders a source buffer using a caller-provided highlighter.
highlight_to_ansi_with_highlighter_and_mode
Highlights and renders a source buffer using a caller-provided highlighter and color mode.
highlight_to_ansi_with_highlighter_and_mode_and_background
Highlights and renders a source buffer using caller-provided highlighter and explicit background behavior.
highlight_to_ansi_with_mode
Highlights and renders a source buffer with an explicit ANSI color mode.
highlight_to_ansi_with_mode_and_background
Highlights and renders a source buffer with explicit color and background behavior.
osc_reset_default_background
Returns OSC 111 to reset terminal default background color.
osc_reset_default_colors
Returns OSC 110 + 111 to reset terminal default foreground/background colors.
osc_reset_default_foreground
Returns OSC 110 to reset terminal default foreground color.
osc_set_default_background
Builds OSC 11 to set terminal default background color.
osc_set_default_colors
Builds OSC 10/11 terminal default-color updates.
osc_set_default_colors_from_theme
Builds OSC terminal default-color updates from a theme.
osc_set_default_foreground
Builds OSC 10 to set terminal default foreground color.
render_ansi
Renders a source buffer and styled spans into a single ANSI string.
render_ansi_lines
Renders a source buffer and styled spans into per-line ANSI strings.
render_ansi_lines_with_mode
Renders a source buffer and styled spans into per-line ANSI strings.
render_ansi_lines_with_mode_and_background
Renders a source buffer and styled spans into per-line ANSI strings.
render_ansi_with_mode
Renders a source buffer and styled spans into a single ANSI string.
render_ansi_with_mode_and_background
Renders a source buffer and styled spans into a single ANSI string.
resolve_styled_spans
Resolves highlight spans into renderable spans by attaching theme styles.