pub struct GridItem {
pub column_start: usize,
pub column_end: usize,
pub row_start: usize,
pub row_end: usize,
pub area: Option<String>,
pub column_span: usize,
pub row_span: usize,
pub justify_self: Option<GridAlign>,
pub align_self: Option<GridAlign>,
}Expand description
Grid item placement properties.
Fields§
§column_start: usizeColumn start (1-indexed like CSS, 0 = auto)
column_end: usizeColumn end (exclusive, 0 = auto)
row_start: usizeRow start (1-indexed like CSS, 0 = auto)
row_end: usizeRow end (exclusive, 0 = auto)
area: Option<String>Named area to place in
column_span: usizeColumn span (alternative to column_end)
row_span: usizeRow span (alternative to row_end)
justify_self: Option<GridAlign>Alignment within cell (horizontal)
align_self: Option<GridAlign>Alignment within cell (vertical)
Implementations§
Source§impl GridItem
impl GridItem
Sourcepub const fn span_columns(self, span: usize) -> Self
pub const fn span_columns(self, span: usize) -> Self
Span multiple columns.
Sourcepub const fn justify_self(self, align: GridAlign) -> Self
pub const fn justify_self(self, align: GridAlign) -> Self
Set horizontal alignment.
Sourcepub const fn align_self(self, align: GridAlign) -> Self
pub const fn align_self(self, align: GridAlign) -> Self
Set vertical alignment.
Sourcepub fn effective_column_span(&self) -> usize
pub fn effective_column_span(&self) -> usize
Get effective column span.
Sourcepub fn effective_row_span(&self) -> usize
pub fn effective_row_span(&self) -> usize
Get effective row span.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GridItem
impl<'de> Deserialize<'de> for GridItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GridItem
impl RefUnwindSafe for GridItem
impl Send for GridItem
impl Sync for GridItem
impl Unpin for GridItem
impl UnwindSafe for GridItem
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