pub struct FlexConfig { /* private fields */ }Expand description
How one child of a FlexBox sizes and aligns. Compose’s
FlexConfigScope settings; give it with Modifier::flex.
Implementations§
Source§impl FlexConfig
impl FlexConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
A child that does not grow, shrinks with weight 1 and starts at the size it takes with no limit.
Sourcepub fn align_self(self, align: FlexAlignSelf) -> Self
pub fn align_self(self, align: FlexAlignSelf) -> Self
Sets where this child sits across its line.
Sourcepub fn order(self, order: i32) -> Self
pub fn order(self, order: i32) -> Self
Sets the child’s place among its siblings: lower orders come first, equal ones keep the composition order.
Sourcepub fn grow(self, grow: f32) -> Self
pub fn grow(self, grow: f32) -> Self
Sets the child’s share of the room a line leaves; negative counts as 0. Without one, a child grows by the fraction its fill modifier gives along the main axis, and otherwise not.
Trait Implementations§
Source§impl Clone for FlexConfig
impl Clone for FlexConfig
impl Copy for FlexConfig
Source§impl Debug for FlexConfig
impl Debug for FlexConfig
Source§impl Default for FlexConfig
impl Default for FlexConfig
Source§impl PartialEq for FlexConfig
impl PartialEq for FlexConfig
impl StructuralPartialEq for FlexConfig
Auto Trait Implementations§
impl Freeze for FlexConfig
impl RefUnwindSafe for FlexConfig
impl Send for FlexConfig
impl Sync for FlexConfig
impl Unpin for FlexConfig
impl UnsafeUnpin for FlexConfig
impl UnwindSafe for FlexConfig
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
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> ⓘ
Converts
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> ⓘ
Converts
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