pub struct TraitSet {Show 38 fields
pub color: Option<Color>,
pub background_color: Option<Color>,
pub font_family: Option<String>,
pub font_size: Option<Length>,
pub font_weight: Option<u16>,
pub font_style: Option<FontStyle>,
pub text_decoration: Option<TextDecoration>,
pub border_width: Option<[Length; 4]>,
pub border_color: Option<[Color; 4]>,
pub border_style: Option<[BorderStyle; 4]>,
pub padding: Option<[Length; 4]>,
pub text_align: Option<TextAlign>,
pub link_destination: Option<String>,
pub is_leader: Option<String>,
pub rule_thickness: Option<Length>,
pub rule_style: Option<String>,
pub line_height: Option<Length>,
pub letter_spacing: Option<Length>,
pub word_spacing: Option<Length>,
pub border_radius: Option<[Length; 4]>,
pub overflow: Option<OverflowBehavior>,
pub opacity: Option<f64>,
pub text_transform: Option<TextTransform>,
pub font_variant: Option<FontVariant>,
pub display_align: Option<DisplayAlign>,
pub baseline_shift: Option<f64>,
pub hyphenate: Option<bool>,
pub hyphenation_min_word_chars: Option<u32>,
pub hyphenation_push_chars: Option<u32>,
pub hyphenation_remain_chars: Option<u32>,
pub font_stretch: Option<FontStretch>,
pub text_align_last: Option<TextAlign>,
pub change_bar_color: Option<Color>,
pub span: Span,
pub role: Option<String>,
pub xml_lang: Option<String>,
pub writing_mode: WritingMode,
pub direction: Direction,
}Expand description
Rendering traits for an area
These are the properties that affect rendering (color, background, borders, etc.)
Fields§
§color: Option<Color>Text color
background_color: Option<Color>Background color
font_family: Option<String>Font family
font_size: Option<Length>Font size
font_weight: Option<u16>Font weight (100-900, 400 = normal, 700 = bold)
font_style: Option<FontStyle>Font style (normal, italic, oblique)
text_decoration: Option<TextDecoration>Text decoration
border_width: Option<[Length; 4]>Border widths (top, right, bottom, left)
border_color: Option<[Color; 4]>Border colors (top, right, bottom, left)
border_style: Option<[BorderStyle; 4]>Border styles (top, right, bottom, left)
padding: Option<[Length; 4]>Padding (top, right, bottom, left)
text_align: Option<TextAlign>Text alignment
link_destination: Option<String>Link destination (for hyperlinks)
is_leader: Option<String>Leader pattern (dots, rule, space, use-content)
rule_thickness: Option<Length>Rule thickness (for rule leaders)
rule_style: Option<String>Rule style (for rule leaders: solid, dashed, dotted)
line_height: Option<Length>Line height
letter_spacing: Option<Length>Letter spacing (extra space between characters)
word_spacing: Option<Length>Word spacing (extra space between words)
border_radius: Option<[Length; 4]>Border radius for rounded corners (top-left, top-right, bottom-right, bottom-left) Each corner can have independent radius values
overflow: Option<OverflowBehavior>Overflow behavior - controls clipping of content
opacity: Option<f64>Opacity - transparency level (0.0 = transparent, 1.0 = opaque)
text_transform: Option<TextTransform>Text transformation
font_variant: Option<FontVariant>Font variant
display_align: Option<DisplayAlign>Display alignment (vertical alignment)
baseline_shift: Option<f64>Baseline shift for inline positioning (positive = up, negative = down, as fraction of font-size)
hyphenate: Option<bool>Whether hyphenation is enabled
hyphenation_min_word_chars: Option<u32>Minimum word length before hyphenation (hyphenation-minimum-word-count)
hyphenation_push_chars: Option<u32>Characters before hyphen (hyphenation-push-character-count)
hyphenation_remain_chars: Option<u32>Characters after hyphen (hyphenation-remain-character-count)
font_stretch: Option<FontStretch>Font stretch (condensed/expanded)
text_align_last: Option<TextAlign>Text alignment for last line (used with justify)
change_bar_color: Option<Color>Change bar color (for margin rule rendering)
span: SpanSpan property (none or all columns)
role: Option<String>Role attribute for accessibility tagging (PDF/UA)
xml_lang: Option<String>Language attribute (xml:lang) for language tagging
writing_mode: WritingModeWriting mode (lr-tb, rl-tb, tb-rl, tb-lr)
direction: DirectionText direction (ltr, rtl)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TraitSet
impl RefUnwindSafe for TraitSet
impl Send for TraitSet
impl Sync for TraitSet
impl Unpin for TraitSet
impl UnsafeUnpin for TraitSet
impl UnwindSafe for TraitSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().