pub struct MasonryStyle {
pub columns: usize,
pub column_gap: f32,
pub row_gap: f32,
pub align: Align,
}Expand description
Layout style for a masonry container.
Fields§
§columns: usizeNumber of columns. Values below one are clamped to one.
column_gap: f32Gap between adjacent columns.
row_gap: f32Gap between adjacent items in the same column.
align: AlignDefault horizontal alignment of items inside their column.
Implementations§
Source§impl MasonryStyle
impl MasonryStyle
Sourcepub fn columns(self, columns: usize) -> Self
pub fn columns(self, columns: usize) -> Self
Sets the number of columns, clamped to at least one.
Sourcepub fn column_gap(self, gap: f32) -> Self
pub fn column_gap(self, gap: f32) -> Self
Sets the gap between adjacent columns.
Sourcepub fn align_items(self, align: Align) -> Self
pub fn align_items(self, align: Align) -> Self
Sets the default horizontal alignment of items inside their column.
Trait Implementations§
Source§impl Clone for MasonryStyle
impl Clone for MasonryStyle
impl Copy for MasonryStyle
Source§impl Debug for MasonryStyle
impl Debug for MasonryStyle
Source§impl Default for MasonryStyle
impl Default for MasonryStyle
Source§impl PartialEq for MasonryStyle
impl PartialEq for MasonryStyle
impl StructuralPartialEq for MasonryStyle
Auto Trait Implementations§
impl Freeze for MasonryStyle
impl RefUnwindSafe for MasonryStyle
impl Send for MasonryStyle
impl Sync for MasonryStyle
impl Unpin for MasonryStyle
impl UnsafeUnpin for MasonryStyle
impl UnwindSafe for MasonryStyle
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