pub struct FlexLayout {
pub direction: FlexDirection,
pub justify: JustifyContent,
pub align: AlignItems,
pub gap: f32,
pub wrap: FlexWrap,
pub align_content: AlignContent,
}Expand description
A flexbox container (single-line or multi-line).
Fields§
§direction: FlexDirectionMain-axis direction.
justify: JustifyContentMain-axis distribution.
align: AlignItemsCross-axis alignment of items within each line.
gap: f32Gap between adjacent items in logical pixels.
wrap: FlexWrapWhether and how items wrap into multiple lines.
align_content: AlignContentDistribution of lines along the cross axis (only relevant when
wrap != NoWrap and there are multiple lines).
Implementations§
Source§impl FlexLayout
impl FlexLayout
Sourcepub fn with_justify(self, justify: JustifyContent) -> Self
pub fn with_justify(self, justify: JustifyContent) -> Self
Builder: set justify-content.
Sourcepub fn with_align(self, align: AlignItems) -> Self
pub fn with_align(self, align: AlignItems) -> Self
Builder: set align-items.
Sourcepub fn with_align_content(self, ac: AlignContent) -> Self
pub fn with_align_content(self, ac: AlignContent) -> Self
Builder: set cross-axis line distribution (only applies when wrapping).
Trait Implementations§
Source§impl Clone for FlexLayout
impl Clone for FlexLayout
Source§fn clone(&self) -> FlexLayout
fn clone(&self) -> FlexLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlexLayout
impl Debug for FlexLayout
Source§impl Default for FlexLayout
impl Default for FlexLayout
impl Copy for FlexLayout
Auto Trait Implementations§
impl Freeze for FlexLayout
impl RefUnwindSafe for FlexLayout
impl Send for FlexLayout
impl Sync for FlexLayout
impl Unpin for FlexLayout
impl UnsafeUnpin for FlexLayout
impl UnwindSafe for FlexLayout
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