pub struct LayoutNode {
pub constraint_w: Constraint,
pub constraint_h: Constraint,
pub children: Vec<LayoutNode>,
pub rect: Rect,
pub flex_grow: f32,
pub padding: f32,
}Expand description
A node in a layout tree.
Fields§
§constraint_w: Constraint§constraint_h: Constraint§children: Vec<LayoutNode>§rect: RectComputed rect (set after arrange).
flex_grow: f32§padding: f32Implementations§
Source§impl LayoutNode
impl LayoutNode
pub fn new(cw: Constraint, ch: Constraint) -> Self
pub fn with_flex(self, g: f32) -> Self
pub fn with_padding(self, p: f32) -> Self
pub fn push_child(&mut self, child: LayoutNode)
Trait Implementations§
Source§impl Clone for LayoutNode
impl Clone for LayoutNode
Source§fn clone(&self) -> LayoutNode
fn clone(&self) -> LayoutNode
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 moreAuto Trait Implementations§
impl Freeze for LayoutNode
impl RefUnwindSafe for LayoutNode
impl Send for LayoutNode
impl Sync for LayoutNode
impl Unpin for LayoutNode
impl UnsafeUnpin for LayoutNode
impl UnwindSafe for LayoutNode
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