Expand description
Alignment tokens: unit values that name one position and convert into exactly the alignment types that position is legal for.
vstack(..).alignment(Leading) reads as the intent; vstack(..).alignment(Top)
does not compile, because Top has no Into<HorizontalAlignment>. The
per-container methods (.leading(), .top(), .top_leading(), …) are the
same positions spelled without an argument.
Structs§
- Bottom
- The bottom edge: an
HStackrow, or a two-dimensional cell centered horizontally. - Bottom
Leading - The bottom-leading corner of a two-dimensional cell.
- Bottom
Trailing - The bottom-trailing corner of a two-dimensional cell.
- Center
- The center on whichever axes the container aligns.
- First
Baseline - The first text baseline of an
HStackrow. - Last
Baseline - The last text baseline of an
HStackrow. - Leading
- The leading edge: a
VStackcolumn, or aZStack/Frame/Gridcell centered vertically. - Top
- The top edge: an
HStackrow, or a two-dimensional cell centered horizontally. - TopLeading
- The top-leading corner of a two-dimensional cell.
- TopTrailing
- The top-trailing corner of a two-dimensional cell.
- Trailing
- The trailing edge: a
VStackcolumn, or a two-dimensional cell centered vertically.