pub struct HeadingSpec<'a> {
pub text: &'a str,
pub level: u8,
pub width_px: u32,
pub height_px: u32,
}Expand description
Everything a heading’s geometry depends on: the text, the level (which picks the type scale), and the pixel box the raster fills. Deliberately free of colors and caret state so the same spec drives rasterization, hit-testing, and the fits check — a click must be answered by exactly the layout that was drawn.
Fields§
§text: &'a str§level: u8Heading level, 1 or 2 — the only levels big enough to rasterize.
width_px: u32§height_px: u32Trait Implementations§
Source§impl<'a> Clone for HeadingSpec<'a>
impl<'a> Clone for HeadingSpec<'a>
Source§fn clone(&self) -> HeadingSpec<'a>
fn clone(&self) -> HeadingSpec<'a>
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<'a> Copy for HeadingSpec<'a>
Source§impl<'a> Debug for HeadingSpec<'a>
impl<'a> Debug for HeadingSpec<'a>
Source§impl<'a> PartialEq for HeadingSpec<'a>
impl<'a> PartialEq for HeadingSpec<'a>
impl<'a> StructuralPartialEq for HeadingSpec<'a>
Auto Trait Implementations§
impl<'a> Freeze for HeadingSpec<'a>
impl<'a> RefUnwindSafe for HeadingSpec<'a>
impl<'a> Send for HeadingSpec<'a>
impl<'a> Sync for HeadingSpec<'a>
impl<'a> Unpin for HeadingSpec<'a>
impl<'a> UnsafeUnpin for HeadingSpec<'a>
impl<'a> UnwindSafe for HeadingSpec<'a>
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