pub struct AnsiOptions {
pub use_theme_base_style: bool,
pub width: Option<usize>,
pub pad_to_width: bool,
pub tab_width: usize,
pub margin_x: usize,
pub margin_y: usize,
pub padding_x: usize,
pub padding_y: usize,
pub border: bool,
}Expand description
Options controlling ANSI rendering behavior.
Fields§
§use_theme_base_style: boolIf true, apply the theme’s foreground/background as a base style for all text (including un-highlighted regions).
width: Option<usize>Optional hard wrap width (in columns). When None, no wrapping is performed and the original line structure is preserved.
pad_to_width: boolIf true and width is set, pad each visual line with spaces up
to exactly width columns.
tab_width: usizeTab width (in columns) used when computing display width.
margin_x: usizeHorizontal margin (in columns) outside the border/background. This is empty space with no styling.
margin_y: usizeVertical margin (in rows) outside the border/background. This is empty space with no styling.
padding_x: usizeHorizontal padding (in columns) on left and right sides. Inside the background, between border and content.
padding_y: usizeVertical padding (in rows) on top and bottom. Inside the background, between border and content.
border: boolIf true, draw a border around the code block using half-block characters.
Trait Implementations§
Source§impl Clone for AnsiOptions
impl Clone for AnsiOptions
Source§fn clone(&self) -> AnsiOptions
fn clone(&self) -> AnsiOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more