pub struct FlexItem {
pub grow: f32,
pub shrink: f32,
pub basis: Option<f32>,
pub align_self: Option<FlexAlign>,
pub collapse_if_empty: bool,
}Expand description
Flex item properties.
Fields§
§grow: f32Flex grow factor
shrink: f32Flex shrink factor
basis: Option<f32>Flex basis (initial size)
align_self: Option<FlexAlign>Self alignment override
collapse_if_empty: boolUX-107: Collapse to zero size when content is empty. When true, items with no content will have 0 size in layout.
Implementations§
Source§impl FlexItem
impl FlexItem
Sourcepub const fn align_self(self, align: FlexAlign) -> Self
pub const fn align_self(self, align: FlexAlign) -> Self
Set self alignment.
Sourcepub const fn collapse_if_empty(self) -> Self
pub const fn collapse_if_empty(self) -> Self
UX-107: Enable auto-collapse when content is empty.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FlexItem
impl<'de> Deserialize<'de> for FlexItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for FlexItem
Auto Trait Implementations§
impl Freeze for FlexItem
impl RefUnwindSafe for FlexItem
impl Send for FlexItem
impl Sync for FlexItem
impl Unpin for FlexItem
impl UnwindSafe for FlexItem
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