#[repr(C)]pub struct LayoutInfo {
pub max: Coord,
pub max_percent: Coord,
pub min: Coord,
pub min_percent: Coord,
pub preferred: Coord,
pub stretch: f32,
}
Expand description
The constraint that applies to an item
Fields§
§max: Coord
The maximum size for the item.
max_percent: Coord
The maximum size in percentage of the parent (value between 0 and 100).
min: Coord
The minimum size for this item.
min_percent: Coord
The minimum size in percentage of the parent (value between 0 and 100).
preferred: Coord
the preferred size
stretch: f32
the stretch factor
Implementations§
Source§impl LayoutInfo
impl LayoutInfo
pub fn merge(&self, other: &LayoutInfo) -> Self
Sourcepub fn preferred_bounded(&self) -> Coord
pub fn preferred_bounded(&self) -> Coord
Helper function to return a preferred size which is within the min/max constraints
Trait Implementations§
Source§impl Add for LayoutInfo
impl Add for LayoutInfo
Source§impl Clone for LayoutInfo
impl Clone for LayoutInfo
Source§fn clone(&self) -> LayoutInfo
fn clone(&self) -> LayoutInfo
Returns a copy 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 LayoutInfo
impl Debug for LayoutInfo
Source§impl Default for LayoutInfo
impl Default for LayoutInfo
Source§impl PartialEq for LayoutInfo
impl PartialEq for LayoutInfo
impl Copy for LayoutInfo
impl StructuralPartialEq for LayoutInfo
Auto Trait Implementations§
impl Freeze for LayoutInfo
impl RefUnwindSafe for LayoutInfo
impl Send for LayoutInfo
impl Sync for LayoutInfo
impl Unpin for LayoutInfo
impl UnwindSafe for LayoutInfo
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