pub struct FlexParentData {
pub flex: Option<i32>,
pub fit: Option<FlexFit>,
/* private fields */
}Expand description
Parent data for use with RenderFlex.
Fields§
§flex: Option<i32>The flex factor to use for this child.
If None or zero, the child is inflexible and determines its own size. If non-zero, the
amount of space the child’s can occupy in the main axis is determined by dividing the
free space (after placing the inflexible children) according to the flex factors of the
flexible children.
fit: Option<FlexFit>How a flexible child is inscribed into the available space.
If flex is non-zero, the fit determines whether the child fills the space
the parent makes available during layout. If the fit is FlexFit::Tight, the child is
required to fill the available space. If the fit is FlexFit::Loose, the child can be
at most as large as the available space (but is allowed to be smaller).
Implementations§
Source§impl FlexParentData
impl FlexParentData
Sourcepub const fn new() -> FlexParentData
pub const fn new() -> FlexParentData
Creates flex parent data with no flex factor and no fit.
Trait Implementations§
Source§impl ContainerBoxParentData for FlexParentData
impl ContainerBoxParentData for FlexParentData
Source§fn box_parent_data(&self) -> &BoxParentData
fn box_parent_data(&self) -> &BoxParentData
BoxParentData half. Read moreSource§fn box_parent_data_mut(&mut self) -> &mut BoxParentData
fn box_parent_data_mut(&mut self) -> &mut BoxParentData
box_parent_data.Source§fn offset(&self) -> Offset
fn offset(&self) -> Offset
Source§fn set_offset(&mut self, value: Offset)
fn set_offset(&mut self, value: Offset)
offset.Source§impl ContainerParentDataMixin for FlexParentData
impl ContainerParentDataMixin for FlexParentData
Source§type ChildType = AnyRenderBox
type ChildType = AnyRenderBox
AnyRenderBox for a box container.Source§fn container_parent_data(&self) -> &ContainerParentData<AnyRenderBox>
fn container_parent_data(&self) -> &ContainerParentData<AnyRenderBox>
Source§fn container_parent_data_mut(
&mut self,
) -> &mut ContainerParentData<AnyRenderBox>
fn container_parent_data_mut( &mut self, ) -> &mut ContainerParentData<AnyRenderBox>
Source§fn previous_sibling(&self) -> Option<Self::ChildType>
fn previous_sibling(&self) -> Option<Self::ChildType>
Source§fn set_previous_sibling(&mut self, value: Option<Self::ChildType>)
fn set_previous_sibling(&mut self, value: Option<Self::ChildType>)
previous_sibling.Source§fn next_sibling(&self) -> Option<Self::ChildType>
fn next_sibling(&self) -> Option<Self::ChildType>
Source§fn set_next_sibling(&mut self, value: Option<Self::ChildType>)
fn set_next_sibling(&mut self, value: Option<Self::ChildType>)
next_sibling.