Enum taffy::style::GridAutoFlow

source ·
pub enum GridAutoFlow {
    Row,
    Column,
    RowDense,
    ColumnDense,
}
Expand description

Controls whether grid items are placed row-wise or column-wise. And whether the sparse or dense packing algorithm is used.

The “dense” packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. This may cause items to appear out-of-order, when doing so would fill in holes left by larger items.

Defaults to GridAutoFlow::Row

MDN

Variants§

§

Row

Items are placed by filling each row in turn, adding new rows as necessary

§

Column

Items are placed by filling each column in turn, adding new columns as necessary.

§

RowDense

Combines Row with the dense packing algorithm.

§

ColumnDense

Combines Column with the dense packing algorithm.

Implementations§

source§

impl GridAutoFlow

source

pub fn is_dense(&self) -> bool

Whether grid auto placement uses the sparse placement algorithm or the dense placement algorithm See: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow#values

source

pub fn primary_axis(&self) -> AbsoluteAxis

Whether grid auto placement fills areas row-wise or column-wise See: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow#values

Trait Implementations§

source§

impl Clone for GridAutoFlow

source§

fn clone(&self) -> GridAutoFlow

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GridAutoFlow

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GridAutoFlow

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for GridAutoFlow

source§

fn eq(&self, other: &GridAutoFlow) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for GridAutoFlow

source§

impl Eq for GridAutoFlow

source§

impl StructuralPartialEq for GridAutoFlow

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.