pub struct StyleConfig {Show 13 fields
pub margin: usize,
pub list_indent: usize,
pub pretty_pad: bool,
pub pretty_broken: bool,
pub width: usize,
pub hsv: [f64; 3],
pub dark: HsvMultiplier,
pub mid: HsvMultiplier,
pub symbol: HsvMultiplier,
pub head: HsvMultiplier,
pub grey: HsvMultiplier,
pub bright: HsvMultiplier,
pub syntax: String,
}Expand description
Style configuration.
Controls visual styling including margins, indentation, colors, and code block appearance.
Fields§
§margin: usizeLeft margin in characters. Default: 2
list_indent: usizeList item indentation in characters. Default: 2
pretty_pad: boolEnable pretty padding for code blocks. Default: true
pretty_broken: boolEnable broken line indicators. Default: true
width: usizeTerminal width override (0 = auto-detect). Default: 0
hsv: [f64; 3]Base HSV color values [H, S, V]. H is in 0.0..1.0 range (will be scaled to 360) S and V are in 0.0..1.0 range Default: [0.8, 0.5, 0.5]
dark: HsvMultiplierDark color multiplier (for backgrounds).
mid: HsvMultiplierMid color multiplier (for secondary elements).
symbol: HsvMultiplierSymbol color multiplier (for special characters).
head: HsvMultiplierHead color multiplier (for headers).
grey: HsvMultiplierGrey color multiplier (for muted text).
bright: HsvMultiplierBright color multiplier (for emphasis).
syntax: StringSyntax highlighting theme name. Default: “native”
Implementations§
Source§impl StyleConfig
impl StyleConfig
Sourcepub fn merge(&mut self, other: &StyleConfig)
pub fn merge(&mut self, other: &StyleConfig)
Merge another StyleConfig into this one.
Sourcepub fn base_hsv(&self) -> (f64, f64, f64)
pub fn base_hsv(&self) -> (f64, f64, f64)
Get the base HSV values as (H, S, V) tuple.
H is scaled to 0..360 range for color calculations.
Sourcepub fn effective_width(&self) -> usize
pub fn effective_width(&self) -> usize
Get effective width (auto-detect if 0).
Trait Implementations§
Source§impl Clone for StyleConfig
impl Clone for StyleConfig
Source§fn clone(&self) -> StyleConfig
fn clone(&self) -> StyleConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more