pub struct TextStyle {
pub color: Option<String>,
pub background_color: Option<String>,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikethrough: bool,
pub inverse: bool,
pub dim_color: bool,
}Expand description
Inline text styling for an ink-text subtree (P5.1 SET_TEXT_STYLE). Mirrors
ink’s <Text> styling props (color, backgroundColor, bold, italic, underline,
strikethrough, inverse, dimColor).
The render walk reads this via resolve_transform (render/walk.rs) to compose
SGR natively instead of dispatching a per-line JS transform. Stored alongside
has_transform; a node carries exactly one of the two. A styled→plain
rerender clears it via ClearTextStyle (P6.2 CLEAR_TEXT_STYLE).
Fields§
§color: Option<String>§background_color: Option<String>§bold: bool§italic: bool§underline: bool§strikethrough: bool§inverse: bool§dim_color: boolTrait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStyle
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
Mutably borrows from an owned value. Read more