pub struct TextStyle {
pub font_family: Option<String>,
pub font_size: Option<String>,
pub font_weight: Option<String>,
pub letter_spacing: Option<String>,
pub text_transform: Option<String>,
}Expand description
Resolved typography for a single ChartElement::Text literal. All fields
are already prepared as Option<String> — plug them directly into the
Text enum variant.
Fields§
§font_family: Option<String>§font_size: Option<String>§font_weight: Option<String>§letter_spacing: Option<String>§text_transform: Option<String>Implementations§
Source§impl TextStyle
impl TextStyle
Sourcepub fn for_role(theme: &Theme, role: TextRole) -> Self
pub fn for_role(theme: &Theme, role: TextRole) -> Self
Build a TextStyle for the given role from a Theme.
Returns Some(...) only for attributes whose theme value diverges
from its legacy sentinel (see the module-level constants). This keeps
byte-identical output whenever Theme::default() is in effect.
Trait Implementations§
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