pub enum FlexDirection {
Row,
Column,
RowReverse,
ColumnReverse,
}Expand description
Flexbox main-axis direction. Includes the logical *Reverse variants so
the layout backend can flip the inline axis when ResolvedDirection
is LayoutDirection::Rtl (W5.5).
Variants§
Row
Children flow along the inline axis (LTR: left->right).
Column
Children flow along the block axis (top->bottom).
RowReverse
Children flow along the inline axis in reverse (LTR: right->left).
W5.5: a plain Row under RTL resolves into this at the
layout-backend boundary so authors don’t have to think about
mirroring.
ColumnReverse
Children flow along the block axis in reverse (bottom->top).
Implementations§
Source§impl FlexDirection
impl FlexDirection
Sourcepub const fn resolved(self, dir: LayoutDirection) -> Self
pub const fn resolved(self, dir: LayoutDirection) -> Self
Resolve the logical flex direction under a concrete writing
direction. Authors keep writing Row; the backend calls this so
Row flips to Self::RowReverse under
LayoutDirection::Rtl (mirrors Qt / Web flex semantics).
Column / *Reverse pass through unchanged because the block
axis is not affected by writing direction.
Trait Implementations§
Source§impl Clone for FlexDirection
impl Clone for FlexDirection
Source§fn clone(&self) -> FlexDirection
fn clone(&self) -> FlexDirection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FlexDirection
impl Debug for FlexDirection
Source§impl Default for FlexDirection
impl Default for FlexDirection
Source§fn default() -> FlexDirection
fn default() -> FlexDirection
Source§impl PartialEq for FlexDirection
impl PartialEq for FlexDirection
Source§fn eq(&self, other: &FlexDirection) -> bool
fn eq(&self, other: &FlexDirection) -> bool
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.