pub enum Alignment {
Start,
Center,
End,
SpaceBetween,
SpaceEvenly,
SpaceAround,
}Variants§
Start
Align children to the start of the axis. This is the default.
Center
Align children to the center of the axis.
End
Align children to the end of the axis.
SpaceBetween
Distribute children with equal space between them, no space at the edges.
SpaceEvenly
Distribute children with equal space between and around them, including the edges.
SpaceAround
Distribute children with equal space around them, half-size space at the edges.
Implementations§
Source§impl Alignment
impl Alignment
Sourcepub fn space_between() -> Alignment
pub fn space_between() -> Alignment
Use a SpaceBetween alignment.
Sourcepub fn space_evenly() -> Alignment
pub fn space_evenly() -> Alignment
Use a SpaceEvenly alignment.
Sourcepub fn space_around() -> Alignment
pub fn space_around() -> Alignment
Use a SpaceAround alignment.
pub const fn is_not_start(&self) -> bool
pub const fn is_spaced(&self) -> bool
pub fn pretty(&self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Alignment
impl<'de> Deserialize<'de> for Alignment
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 Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations§
impl Freeze for Alignment
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnwindSafe for Alignment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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