pub fn render_ansi_to(
source: &str,
document: &HighlightedDocument,
options: &AnsiOptions,
output: &mut dyn Write,
) -> Result<HighlightStatus>Available on crate feature
ansi only.Expand description
Writes ANSI output to a caller-provided writer and returns tokenization status.
Uses the same options, sanitization, and source validation as render_ansi.
Validation finishes before writing anything. Writer failures return
Error::Render and may leave partial output (including an active SGR style);
the renderer does not flush or roll it back.