pub struct GridProps {
pub layout: LayoutStyle,
pub cols: u16,
pub rows: Option<u16>,
pub template_columns: Option<Vec<GridTrackSizing>>,
pub template_rows: Option<Vec<GridTrackSizing>>,
pub gap: SpacingLength,
pub column_gap: Option<SpacingLength>,
pub row_gap: Option<SpacingLength>,
pub padding: SpacingEdges,
pub justify: MainAlign,
pub align: CrossAlign,
pub justify_items: Option<CrossAlign>,
}Fields§
§layout: LayoutStyle§cols: u16§rows: Option<u16>§template_columns: Option<Vec<GridTrackSizing>>Explicit per-track column sizing.
When present and non-empty, this takes precedence over cols.
template_rows: Option<Vec<GridTrackSizing>>Explicit per-track row sizing.
When present and non-empty, this takes precedence over rows.
gap: SpacingLength§column_gap: Option<SpacingLength>Grid inline-axis gap.
When None, the runtime falls back to the shared gap shorthand.
row_gap: Option<SpacingLength>Grid block-axis gap.
When None, the runtime falls back to the shared gap shorthand.
padding: SpacingEdges§justify: MainAlign§align: CrossAlign§justify_items: Option<CrossAlign>Grid-only inline-axis item alignment (justify-items).
When None, the runtime preserves the underlying grid default (stretch).
Implementations§
Source§impl GridProps
impl GridProps
pub fn resolved_column_gap(&self) -> SpacingLength
pub fn resolved_row_gap(&self) -> SpacingLength
Trait Implementations§
impl StructuralPartialEq for GridProps
Auto Trait Implementations§
impl Freeze for GridProps
impl RefUnwindSafe for GridProps
impl Send for GridProps
impl Sync for GridProps
impl Unpin for GridProps
impl UnsafeUnpin for GridProps
impl UnwindSafe for GridProps
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