#[non_exhaustive]pub struct LayoutNodeData { /* private fields */ }Expand description
Per-node layout data stored directly on the DOM node.
This replaces the separate LayoutTree + TaffyLayoutData with data
co-located on each DOM node. Taffy’s trait implementations read/write
this data directly through Document.
Chrome equivalent: LayoutObject’s inline style/cache/geometry fields.
Implementations§
Source§impl LayoutNodeData
impl LayoutNodeData
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the Taffy cache, forcing re-layout on next pass.
Sourcepub fn layout_parent(&self) -> Option<u32>
pub fn layout_parent(&self) -> Option<u32>
Returns the layout parent index for ancestor propagation.
Sourcepub fn invalidate_layout_children(&mut self)
pub fn invalidate_layout_children(&mut self)
Mark layout children as needing reconstruction.
Sourcepub fn has_layout_children(&self) -> bool
pub fn has_layout_children(&self) -> bool
Whether layout children have been constructed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayoutNodeData
impl RefUnwindSafe for LayoutNodeData
impl !Send for LayoutNodeData
impl !Sync for LayoutNodeData
impl Unpin for LayoutNodeData
impl UnsafeUnpin for LayoutNodeData
impl UnwindSafe for LayoutNodeData
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> 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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert