pub struct LayoutNodeHot {
pub box_props: PackedBoxProps,
pub dom_node_id: Option<NodeId>,
pub used_size: Option<LogicalSize>,
pub formatting_context: FormattingContext,
pub parent: Option<usize>,
}Expand description
Hot layout node fields — accessed on every node in every layout pass.
Stored in a separate Vec for cache locality. At ~100 bytes per node,
1000 nodes fit in ~100 KB (L2 cache), vs ~550 KB with the monolithic struct.
Fields§
§box_props: PackedBoxPropsThe resolved box model properties (margin, border, padding)
Stored in packed i16×10 encoding to reduce cache footprint.
Use box_props.unpack() to get f32 ResolvedBoxProps for computation.
dom_node_id: Option<NodeId>Reference back to the original DOM node (None for anonymous boxes)
used_size: Option<LogicalSize>The size used during the last layout pass.
formatting_context: FormattingContextThe formatting context this node establishes or participates in.
parent: Option<usize>Parent index (None for root)
Trait Implementations§
Source§impl Clone for LayoutNodeHot
impl Clone for LayoutNodeHot
Source§fn clone(&self) -> LayoutNodeHot
fn clone(&self) -> LayoutNodeHot
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 moreAuto Trait Implementations§
impl Freeze for LayoutNodeHot
impl RefUnwindSafe for LayoutNodeHot
impl Send for LayoutNodeHot
impl Sync for LayoutNodeHot
impl Unpin for LayoutNodeHot
impl UnsafeUnpin for LayoutNodeHot
impl UnwindSafe for LayoutNodeHot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more