Enum lay_rs::prelude::taffy::GridAutoFlow
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
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§
§impl GridAutoFlow
impl GridAutoFlow
pub fn is_dense(&self) -> bool
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
pub fn primary_axis(&self) -> AbsoluteAxis
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§
§impl Clone for GridAutoFlow
impl Clone for GridAutoFlow
§fn clone(&self) -> GridAutoFlow
fn clone(&self) -> GridAutoFlow
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for GridAutoFlow
impl Debug for GridAutoFlow
§impl Default for GridAutoFlow
impl Default for GridAutoFlow
§fn default() -> GridAutoFlow
fn default() -> GridAutoFlow
§impl<'de> Deserialize<'de> for GridAutoFlow
impl<'de> Deserialize<'de> for GridAutoFlow
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GridAutoFlow, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GridAutoFlow, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for GridAutoFlow
impl PartialEq for GridAutoFlow
§impl Serialize for GridAutoFlow
impl Serialize for GridAutoFlow
§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 GridAutoFlow
impl Eq for GridAutoFlow
impl StructuralPartialEq for GridAutoFlow
Auto Trait Implementations§
impl Freeze for GridAutoFlow
impl RefUnwindSafe for GridAutoFlow
impl Send for GridAutoFlow
impl Sync for GridAutoFlow
impl Unpin for GridAutoFlow
impl UnwindSafe for GridAutoFlow
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