Enum lay_rs::prelude::taffy::FlexDirection
pub enum FlexDirection {
Row,
Column,
RowReverse,
ColumnReverse,
}
Expand description
The direction of the flexbox layout main axis.
There are always two perpendicular layout axes: main (or primary) and cross (or secondary). Adding items will cause them to be positioned adjacent to each other along the main axis. By varying this value throughout your tree, you can create complex axis-aligned layouts.
Items are always aligned relative to the cross axis, and justified relative to the main axis.
The default behavior is FlexDirection::Row
.
Variants§
Row
Defines +x as the main axis
Items will be added from left to right in a row.
Column
Defines +y as the main axis
Items will be added from top to bottom in a column.
RowReverse
Defines -x as the main axis
Items will be added from right to left in a row.
ColumnReverse
Defines -y as the main axis
Items will be added from bottom to top in a column.
Trait Implementations§
§impl Clone for FlexDirection
impl Clone for FlexDirection
§fn clone(&self) -> FlexDirection
fn clone(&self) -> FlexDirection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for FlexDirection
impl Debug for FlexDirection
§impl Default for FlexDirection
impl Default for FlexDirection
§fn default() -> FlexDirection
fn default() -> FlexDirection
§impl<'de> Deserialize<'de> for FlexDirection
impl<'de> Deserialize<'de> for FlexDirection
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FlexDirection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FlexDirection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for FlexDirection
impl PartialEq for FlexDirection
§impl Serialize for FlexDirection
impl Serialize for FlexDirection
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for FlexDirection
impl Eq for FlexDirection
impl StructuralPartialEq for FlexDirection
Auto Trait Implementations§
impl Freeze for FlexDirection
impl RefUnwindSafe for FlexDirection
impl Send for FlexDirection
impl Sync for FlexDirection
impl Unpin for FlexDirection
impl UnwindSafe for FlexDirection
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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
key
and return true
if they are equal.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>
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>
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