pub struct AlignItems {
pub keyword: AlignItemsKeyword,
pub safety: AlignmentSafety,
}Expand description
Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis. For Grid it controls alignment in the block axis.
Fields§
§keyword: AlignItemsKeywordPosition keyword.
safety: AlignmentSafetyOverflow-position modifier (safe / unsafe).
Implementations§
Source§impl AlignItems
impl AlignItems
Sourcepub const START: AlignItems
pub const START: AlignItems
Items are packed toward the start of the axis.
Sourcepub const END: AlignItems
pub const END: AlignItems
Items are packed toward the end of the axis.
Sourcepub const FLEX_START: AlignItems
pub const FLEX_START: AlignItems
Items are packed towards the flex-relative start of the axis.
Sourcepub const FLEX_END: AlignItems
pub const FLEX_END: AlignItems
Items are packed towards the flex-relative end of the axis.
Sourcepub const CENTER: AlignItems
pub const CENTER: AlignItems
Items are packed along the center of the cross axis.
Sourcepub const BASELINE: AlignItems
pub const BASELINE: AlignItems
Items are aligned such as their baselines align.
Sourcepub const STRETCH: AlignItems
pub const STRETCH: AlignItems
Stretch to fill the container.
Sourcepub const SAFE_START: AlignItems
pub const SAFE_START: AlignItems
Like AlignItems::START, but falls back to AlignItems::START when the
alignment subject overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_END: AlignItems
pub const SAFE_END: AlignItems
Like AlignItems::END, but falls back to AlignItems::START when the
alignment subject overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_FLEX_START: AlignItems
pub const SAFE_FLEX_START: AlignItems
Like AlignItems::FLEX_START, but falls back to AlignItems::START when the
alignment subject overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_FLEX_END: AlignItems
pub const SAFE_FLEX_END: AlignItems
Like AlignItems::FLEX_END, but falls back to AlignItems::START when the
alignment subject overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_CENTER: AlignItems
pub const SAFE_CENTER: AlignItems
Like AlignItems::CENTER, but falls back to AlignItems::START when the
alignment subject overflows the alignment container, to avoid data loss.
Sourcepub const fn is_safe(self) -> bool
pub const fn is_safe(self) -> bool
Returns true iff this carries the safe overflow-position modifier.
Sourcepub const fn keyword(self) -> AlignItemsKeyword
pub const fn keyword(self) -> AlignItemsKeyword
Returns the underlying position keyword, discarding the safety modifier.
Trait Implementations§
Source§impl Clone for AlignItems
impl Clone for AlignItems
Source§fn clone(&self) -> AlignItems
fn clone(&self) -> AlignItems
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AlignItems
Source§impl Debug for AlignItems
impl Debug for AlignItems
impl Eq for AlignItems
Source§impl PartialEq for AlignItems
impl PartialEq for AlignItems
Source§fn eq(&self, other: &AlignItems) -> bool
fn eq(&self, other: &AlignItems) -> bool
self and other values to be equal, and is used by ==.