pub struct TextScaleEntry {
pub size: Option<FontSize>,
pub weight: Option<u16>,
pub line_height: Option<FontSize>,
}Expand description
A single entry in a text scale: size, weight, and line height.
Used to define typographic roles (caption, heading, etc.) with consistent sizing and spacing.
Fields§
§size: Option<FontSize>Font size with explicit unit (points or pixels).
Same semantics as FontSpec.size – in TOML, set as size_pt or
size_px. Converted to f32 logical pixels during validation.
weight: Option<u16>CSS font weight (100–900).
line_height: Option<FontSize>Line height with explicit unit. When None, resolve() computes it
as defaults.line_height * size.raw(), preserving the unit of size.
Implementations§
Source§impl TextScaleEntry
impl TextScaleEntry
Sourcepub const FIELD_NAMES: &[&str]
pub const FIELD_NAMES: &[&str]
All serialized field names for TOML linting.
Source§impl TextScaleEntry
impl TextScaleEntry
Trait Implementations§
Source§impl Clone for TextScaleEntry
impl Clone for TextScaleEntry
Source§fn clone(&self) -> TextScaleEntry
fn clone(&self) -> TextScaleEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextScaleEntry
impl Debug for TextScaleEntry
Source§impl Default for TextScaleEntry
impl Default for TextScaleEntry
Source§fn default() -> TextScaleEntry
fn default() -> TextScaleEntry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TextScaleEntry
impl<'de> Deserialize<'de> for TextScaleEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextScaleEntry
impl PartialEq for TextScaleEntry
Source§impl Serialize for TextScaleEntry
impl Serialize for TextScaleEntry
impl StructuralPartialEq for TextScaleEntry
Auto Trait Implementations§
impl Freeze for TextScaleEntry
impl RefUnwindSafe for TextScaleEntry
impl Send for TextScaleEntry
impl Sync for TextScaleEntry
impl Unpin for TextScaleEntry
impl UnsafeUnpin for TextScaleEntry
impl UnwindSafe for TextScaleEntry
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