#[non_exhaustive]pub enum FlexDirection {
Row,
Column,
RowReverse,
ColumnReverse,
}Expand description
Defines the direction of flex items within a flex container.
This enum determines how flex items are laid out along the main axis.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Row
Items are laid out in the same direction as the text direction (left-to-right for English)
Column
Items are laid out perpendicular to the text direction (top-to-bottom)
RowReverse
Items are laid out in the opposite direction to the text direction (right-to-left for English)
ColumnReverse
Items are laid out opposite to the column direction (bottom-to-top)
Trait Implementations§
Source§impl Clone for FlexDirection
impl Clone for FlexDirection
Source§fn clone(&self) -> FlexDirection
fn clone(&self) -> FlexDirection
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 FlexDirection
Source§impl Debug for FlexDirection
impl Debug for FlexDirection
Source§impl Default for FlexDirection
impl Default for FlexDirection
Source§fn default() -> FlexDirection
fn default() -> FlexDirection
Returns the “default value” for a type. Read more
Source§impl From<FlexDirection> for FlexDirection
impl From<FlexDirection> for FlexDirection
Source§fn from(value: FlexDirection) -> Self
fn from(value: FlexDirection) -> Self
Converts to this type from the input type.
Source§impl<'i> FromCss<'i> for FlexDirection
impl<'i> FromCss<'i> for FlexDirection
Source§const VALID_TOKENS: &'static [CssToken]
const VALID_TOKENS: &'static [CssToken]
Returns the list of valid CSS tokens for this type.
Source§fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
Parses the type from a
Parser instance.Source§fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
Helper function to parse the type from a string.
Source§const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
Message template used when building parse errors for this type.
Source§impl PartialEq for FlexDirection
impl PartialEq for FlexDirection
Source§fn eq(&self, other: &FlexDirection) -> bool
fn eq(&self, other: &FlexDirection) -> bool
Tests for
self and other values to be equal, and is used by ==.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
Mutably borrows from an owned value. Read more