pub enum AlignContent {
Start,
End,
FlexStart,
FlexEnd,
Center,
Stretch,
SpaceBetween,
SpaceEvenly,
SpaceAround,
}Expand description
重导出样式类型(Style、Display、Position 等) 设置内容之间和周围的空间分布 对于 Flexbox,它控制交叉轴中的对齐 对于 Grid,它控制块轴中的对齐
Variants§
Start
项目打包到轴的起始位置
End
项目打包到轴的末尾
FlexStart
项目打包到相对于 flex 的轴的起始位置。
对于 flex_direction 为 RowReverse 或 ColumnReverse 的 flex 容器,这等效于 End。在所有其他情况下,它等效于 Start。
FlexEnd
项目打包到相对于 flex 的轴的末尾。
对于 flex_direction 为 RowReverse 或 ColumnReverse 的 flex 容器,这等效于 Start。在所有其他情况下,它等效于 End。
Center
项目沿轴中心居中
Stretch
项目拉伸以填充容器
SpaceBetween
第一个和最后一个项目与容器边缘对齐(无间隙) 项目之间的间隙均匀分布。
SpaceEvenly
第一个和最后一个项目之间的间隙与项目之间的间隙完全相同。 间隙均匀分布
SpaceAround
第一个和最后一个项目之间的间隙恰好是项目之间间隙的一半。 间隙按这些比例均匀分布。
Trait Implementations§
Source§impl Clone for AlignContent
impl Clone for AlignContent
Source§fn clone(&self) -> AlignContent
fn clone(&self) -> AlignContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AlignContent
Source§impl Debug for AlignContent
impl Debug for AlignContent
Source§impl<'de> Deserialize<'de> for AlignContent
impl<'de> Deserialize<'de> for AlignContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AlignContent
Source§impl From<AlignContent> for AlignContent
impl From<AlignContent> for AlignContent
Source§fn from(value: AlignContent) -> Self
fn from(value: AlignContent) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for AlignContent
impl JsonSchema for AlignContent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AlignContent
impl PartialEq for AlignContent
Source§impl Serialize for AlignContent
impl Serialize for AlignContent
impl StructuralPartialEq for AlignContent
Auto Trait Implementations§
impl Freeze for AlignContent
impl RefUnwindSafe for AlignContent
impl Send for AlignContent
impl Sync for AlignContent
impl Unpin for AlignContent
impl UnsafeUnpin for AlignContent
impl UnwindSafe for AlignContent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more