pub struct FlexBoxConfig { /* private fields */ }Expand description
How a FlexBox lays its children out. Compose’s FlexBoxConfigScope
settings; the last call for a setting wins.
Implementations§
Source§impl FlexBoxConfig
impl FlexBoxConfig
Sourcepub fn direction(self, direction: FlexDirection) -> Self
pub fn direction(self, direction: FlexDirection) -> Self
Sets the main axis.
Sourcepub fn justify_content(self, justify: FlexJustifyContent) -> Self
pub fn justify_content(self, justify: FlexJustifyContent) -> Self
Sets where a line’s children sit along the main axis.
Sourcepub fn align_items(self, align: FlexAlignItems) -> Self
pub fn align_items(self, align: FlexAlignItems) -> Self
Sets where children sit across their line.
Sourcepub fn align_content(self, align: FlexAlignContent) -> Self
pub fn align_content(self, align: FlexAlignContent) -> Self
Sets where the lines sit across a wrapping box.
Sourcepub fn max_items_in_each_line(self, count: usize) -> Self
pub fn max_items_in_each_line(self, count: usize) -> Self
Sets how many children a line holds at most, at least 1; it applies when the box wraps.
Sourcepub fn row_gap(self, gap: f32) -> Self
pub fn row_gap(self, gap: f32) -> Self
Sets the gap between rows, in dp: between the lines of a row box, between the children of a column box.
Sourcepub fn column_gap(self, gap: f32) -> Self
pub fn column_gap(self, gap: f32) -> Self
Sets the gap between columns, in dp.
Trait Implementations§
Source§impl Clone for FlexBoxConfig
impl Clone for FlexBoxConfig
impl Copy for FlexBoxConfig
Source§impl Debug for FlexBoxConfig
impl Debug for FlexBoxConfig
Source§impl Default for FlexBoxConfig
impl Default for FlexBoxConfig
Source§impl PartialEq for FlexBoxConfig
impl PartialEq for FlexBoxConfig
impl StructuralPartialEq for FlexBoxConfig
Auto Trait Implementations§
impl Freeze for FlexBoxConfig
impl RefUnwindSafe for FlexBoxConfig
impl Send for FlexBoxConfig
impl Sync for FlexBoxConfig
impl Unpin for FlexBoxConfig
impl UnsafeUnpin for FlexBoxConfig
impl UnwindSafe for FlexBoxConfig
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