pub struct Flex {
pub grow_w: bool,
pub grow_h: bool,
pub yields_h: bool,
pub grow_weight: f64,
pub is_spacer: bool,
pub is_group: bool,
pub grid: GridFacts,
pub whole_row: bool,
}Expand description
Read-only layout facts a parent may consult about a child (§7.2 ChildRef).
Fields§
§grow_w: boolWants to fill the horizontal / vertical axis when offered space.
grow_h: bool§yields_h: boolSized after its rigid siblings in a column, against the height they leave (a
.max_height cap): it gives way to them on a short screen, but unlike grow_h it never
makes the column fill what it is offered.
grow_weight: f64This node’s share of the space its growing siblings divide, relative to theirs
(crate::Grow). 0.0, the default, counts as 1.0: read it through
Flex::weight.
is_spacer: boolTakes all remaining main-axis space in a stack.
is_group: boolLayout-transparent group (when/each anchors): stacks lay out its children inline.
grid: GridFactsGrid facts (docs/grid.md): consulted only by GridLayout; inert everywhere else.
whole_row: boolThe node is the platform’s whole list row (a native kinds::LIST_ITEM): it sizes the
row’s height itself, so a list cell gives it only the side margins (docs/list.md “Row
metrics”).
Implementations§
Trait Implementations§
impl Copy for Flex
impl StructuralPartialEq for Flex
Auto Trait Implementations§
impl Forget for Flex
impl Freeze for Flex
impl Move for Flex
impl RefUnwindSafe for Flex
impl Send for Flex
impl Sync for Flex
impl Unpin for Flex
impl UnsafeUnpin for Flex
impl UnwindSafe for Flex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 more