pub struct LayoutConstraint {
pub vertical: Vertical,
pub horizontal: Horizontal,
}
Expand description
LayoutConstraint : Layout constraint relative to containing Frame
Fields§
§vertical: Vertical
Vertical constraint (relative to containing frame) as an enum: - TOP
: Node is laid out relative to top of the containing frame - BOTTOM
: Node is laid out relative to bottom of the containing frame - CENTER
: Node is vertically centered relative to containing frame - TOP_BOTTOM
: Both top and bottom of node are constrained relative to containing frame (node stretches with frame) - SCALE
: Node scales vertically with containing frame
horizontal: Horizontal
Horizontal constraint (relative to containing frame) as an enum: - LEFT
: Node is laid out relative to left of the containing frame - RIGHT
: Node is laid out relative to right of the containing frame - CENTER
: Node is horizontally centered relative to containing frame - LEFT_RIGHT
: Both left and right of node are constrained relative to containing frame (node stretches with frame) - SCALE
: Node scales horizontally with containing frame
Implementations§
Source§impl LayoutConstraint
impl LayoutConstraint
Sourcepub fn new(vertical: Vertical, horizontal: Horizontal) -> LayoutConstraint
pub fn new(vertical: Vertical, horizontal: Horizontal) -> LayoutConstraint
Layout constraint relative to containing Frame
Trait Implementations§
Source§impl Clone for LayoutConstraint
impl Clone for LayoutConstraint
Source§fn clone(&self) -> LayoutConstraint
fn clone(&self) -> LayoutConstraint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more