Trait StackContainer

Source
pub trait StackContainer: UiBase + Default {
    // Provided methods
    fn new(align_items: AlignItems, gap: Val) -> Self { ... }
    fn reverse(self) -> Self { ... }
    fn wrap(self, wrap: FlexWrap) -> Self { ... }
    fn justify_content(self, justify: JustifyContent) -> Self { ... }
    fn align_items(self, align_items: AlignItems) -> Self { ... }
    fn row_gap(self, gap: Val) -> Self { ... }
    fn column_gap(self, gap: Val) -> Self { ... }
    fn spacing(self, gap: Val) -> Self { ... }
}
Expand description

Provides a flexible layout interface for stack-style containers (e.g. HStack, VStack)

Provided Methods§

Source

fn new(align_items: AlignItems, gap: Val) -> Self

Creates a new stack container with specified alignment and spacing

Source

fn reverse(self) -> Self

Reverses the current flex direction (e.g. Row ⇄ RowReverse, Column ⇄ ColumnReverse)

Source

fn wrap(self, wrap: FlexWrap) -> Self

Sets the wrapping behavior of the flex container

Source

fn justify_content(self, justify: JustifyContent) -> Self

Defines how extra space along the main axis is distributed

Source

fn align_items(self, align_items: AlignItems) -> Self

Defines how children are aligned along the cross axis

Source

fn row_gap(self, gap: Val) -> Self

Sets vertical spacing between rows

Source

fn column_gap(self, gap: Val) -> Self

Sets horizontal spacing between columns

Source

fn spacing(self, gap: Val) -> Self

Automatically applies spacing based on current flex direction

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§