#[non_exhaustive]pub struct ResolvedTextScaleEntry {
pub size: f32,
pub weight: u16,
pub line_height: f32,
}Expand description
A single resolved text scale entry with guaranteed size, weight, and line height.
No Default derive: Constructed from a populated
TextScaleEntry during resolution; the missing-field sentinel is
written inline in
crate::resolve::validate_helpers::require_text_scale_entry (private).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.size: f32Font size in logical pixels. A size stated in points is converted at
the resolution context’s
font_dpi.
weight: u16CSS font weight (100-900).
line_height: f32Line height in logical pixels. Computed as defaults.line_height * size
when not explicitly set. An explicit value stated in points is converted
at the same font_dpi as the size.
Trait Implementations§
Source§impl Clone for ResolvedTextScaleEntry
impl Clone for ResolvedTextScaleEntry
Source§impl Debug for ResolvedTextScaleEntry
impl Debug for ResolvedTextScaleEntry
Source§impl<'de> Deserialize<'de> for ResolvedTextScaleEntry
impl<'de> Deserialize<'de> for ResolvedTextScaleEntry
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 ResolvedTextScaleEntry
impl PartialEq for ResolvedTextScaleEntry
Source§impl Serialize for ResolvedTextScaleEntry
impl Serialize for ResolvedTextScaleEntry
impl StructuralPartialEq for ResolvedTextScaleEntry
Auto Trait Implementations§
impl Forget for ResolvedTextScaleEntry
impl Freeze for ResolvedTextScaleEntry
impl Move for ResolvedTextScaleEntry
impl RefUnwindSafe for ResolvedTextScaleEntry
impl Send for ResolvedTextScaleEntry
impl Sync for ResolvedTextScaleEntry
impl Unpin for ResolvedTextScaleEntry
impl UnsafeUnpin for ResolvedTextScaleEntry
impl UnwindSafe for ResolvedTextScaleEntry
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