pub struct AlignContent {
pub keyword: AlignContentKeyword,
pub safety: AlignmentSafety,
}Expand description
Sets the distribution of space between and around content items. For Flexbox it controls alignment in the cross axis. For Grid it controls alignment in the block axis.
Fields§
§keyword: AlignContentKeywordPosition keyword.
safety: AlignmentSafetyOverflow-position modifier (safe / unsafe).
Implementations§
Source§impl AlignContent
impl AlignContent
Sourcepub const START: AlignContent
pub const START: AlignContent
Items are packed toward the start of the axis.
Sourcepub const END: AlignContent
pub const END: AlignContent
Items are packed toward the end of the axis.
Sourcepub const FLEX_START: AlignContent
pub const FLEX_START: AlignContent
Items are packed towards the flex-relative start of the axis.
Sourcepub const FLEX_END: AlignContent
pub const FLEX_END: AlignContent
Items are packed towards the flex-relative end of the axis.
Sourcepub const CENTER: AlignContent
pub const CENTER: AlignContent
Items are centered around the middle of the axis.
Sourcepub const STRETCH: AlignContent
pub const STRETCH: AlignContent
Items are stretched to fill the container.
Sourcepub const SPACE_BETWEEN: AlignContent
pub const SPACE_BETWEEN: AlignContent
The first and last items are aligned flush with the edges of the container.
Sourcepub const SPACE_EVENLY: AlignContent
pub const SPACE_EVENLY: AlignContent
The gap between the first and last items equals the gap between items.
Sourcepub const SPACE_AROUND: AlignContent
pub const SPACE_AROUND: AlignContent
The gap between the first and last items is half the gap between items.
Sourcepub const SAFE_START: AlignContent
pub const SAFE_START: AlignContent
Like AlignContent::START, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_END: AlignContent
pub const SAFE_END: AlignContent
Like AlignContent::END, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_FLEX_START: AlignContent
pub const SAFE_FLEX_START: AlignContent
Like AlignContent::FLEX_START, but falls back to AlignContent::START when
the content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_FLEX_END: AlignContent
pub const SAFE_FLEX_END: AlignContent
Like AlignContent::FLEX_END, but falls back to AlignContent::START when the
content overflows the alignment container, to avoid data loss.
Sourcepub const SAFE_CENTER: AlignContent
pub const SAFE_CENTER: AlignContent
Like AlignContent::CENTER, but falls back to AlignContent::START when the
content 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) -> AlignContentKeyword
pub const fn keyword(self) -> AlignContentKeyword
Returns the underlying position keyword, discarding the safety modifier.
Trait Implementations§
Source§impl Clone for AlignContent
impl Clone for AlignContent
Source§fn clone(&self) -> AlignContent
fn clone(&self) -> AlignContent
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 AlignContent
Source§impl Debug for AlignContent
impl Debug for AlignContent
impl Eq for AlignContent
Source§impl PartialEq for AlignContent
impl PartialEq for AlignContent
Source§fn eq(&self, other: &AlignContent) -> bool
fn eq(&self, other: &AlignContent) -> bool
self and other values to be equal, and is used by ==.