pub struct LayoutGeneration {
pub width: u32,
pub font: u32,
pub theme: u32,
pub zoom_permille: u32,
}Expand description
Identifies the conditions a LayoutCache was computed under.
A cache is valid only for the generation it was built at; anything that changes rendered geometry bumps a field. Critically, bumping a generation does not trigger recomputation — caches are rebuilt lazily when a row is next laid out, so a resize costs O(visible).
Fields§
§width: u32Content width in pixels.
font: u32Bumped on font change.
theme: u32Bumped on theme change (palette resolution can alter nothing geometric, but a theme may carry a font).
zoom_permille: u32Zoom level in per-mille, so the generation stays Eq-comparable.
See docs/design.md “Layout, the height index, and scroll anchoring”.
Trait Implementations§
Source§impl Clone for LayoutGeneration
impl Clone for LayoutGeneration
impl Copy for LayoutGeneration
Source§impl Debug for LayoutGeneration
impl Debug for LayoutGeneration
Source§impl Default for LayoutGeneration
impl Default for LayoutGeneration
impl Eq for LayoutGeneration
Source§impl PartialEq for LayoutGeneration
impl PartialEq for LayoutGeneration
impl StructuralPartialEq for LayoutGeneration
Auto Trait Implementations§
impl Freeze for LayoutGeneration
impl RefUnwindSafe for LayoutGeneration
impl Send for LayoutGeneration
impl Sync for LayoutGeneration
impl Unpin for LayoutGeneration
impl UnsafeUnpin for LayoutGeneration
impl UnwindSafe for LayoutGeneration
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