Trait StackView

Source
pub trait StackView: View {
    // Provided methods
    fn from_justify_content(justify_content: JustifyContent) -> Self { ... }
    fn from_align_items(align_items: AlignItems) -> 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 from_justify_content(justify_content: JustifyContent) -> Self

Source

fn from_align_items(align_items: AlignItems) -> Self

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§