pub struct TextRunAttributes {
pub font_weight: Option<u16>,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikethrough: bool,
}Expand description
Styling attributes surfaced to assistive technology on a synthetic
Role::TextRun node (WCAG 1.3.1 Info and Relationships / EN 301 549
11.5.2.9 “text attributes”). All fields default to “unset”; a rich-text
widget populates them per formatting run so a screen reader can convey
bold / italic / underline / strikethrough spans. AccessKit has no
dedicated bold property, so bold folds into
set_font_weight(700) when no explicit font_weight
is given.
Fields§
§font_weight: Option<u16>Explicit numeric font weight (100..=900). Takes precedence over
bold.
bold: boolBold flag; folded to weight 700 when font_weight is None.
italic: bool§underline: bool§strikethrough: boolTrait Implementations§
Source§impl Clone for TextRunAttributes
impl Clone for TextRunAttributes
Source§fn clone(&self) -> TextRunAttributes
fn clone(&self) -> TextRunAttributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextRunAttributes
Source§impl Debug for TextRunAttributes
impl Debug for TextRunAttributes
Source§impl Default for TextRunAttributes
impl Default for TextRunAttributes
Source§fn default() -> TextRunAttributes
fn default() -> TextRunAttributes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextRunAttributes
impl RefUnwindSafe for TextRunAttributes
impl Send for TextRunAttributes
impl Sync for TextRunAttributes
impl Unpin for TextRunAttributes
impl UnsafeUnpin for TextRunAttributes
impl UnwindSafe for TextRunAttributes
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