pub trait Printable: Write {
// Required method
fn is_terminal(&self) -> bool;
}Expand description
Trait for output destinations in parsers.
This trait allows parsers to write to different output destinations (stdout, stderr, or test collectors) without hardcoding the specific destination. This makes parsers testable by allowing output capture.
Required Methods§
Sourcefn is_terminal(&self) -> bool
fn is_terminal(&self) -> bool
Check if this printer is connected to a terminal.
This is used to determine whether to use terminal-specific features like colors and carriage return-based updates.