pub struct LayoutState {
pub size: Size,
pub position: Point,
pub is_placed: bool,
pub measurement_constraints: Constraints,
pub content_offset: Point,
}Expand description
Retained layout state for a LayoutNode. This mirrors Jetpack Compose’s approach where each node stores its own measured size and placed position, eliminating the need for per-frame LayoutTree reconstruction.
Fields§
§size: SizeThe measured size of this node (width, height).
position: PointPosition relative to parent’s content origin.
is_placed: boolTrue if this node has been placed in the current layout pass.
measurement_constraints: ConstraintsThe constraints used for the last measurement.
content_offset: PointOffset of the content box relative to the node origin (e.g. due to padding).
Trait Implementations§
Source§impl Clone for LayoutState
impl Clone for LayoutState
Source§fn clone(&self) -> LayoutState
fn clone(&self) -> LayoutState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutState
impl Debug for LayoutState
Auto Trait Implementations§
impl Freeze for LayoutState
impl RefUnwindSafe for LayoutState
impl Send for LayoutState
impl Sync for LayoutState
impl Unpin for LayoutState
impl UnwindSafe for LayoutState
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