#[non_exhaustive]pub enum GridTemplateComponent {
LineNames(Vec<String>),
Single(GridTrackSize),
Repeat(GridRepetitionCount, Vec<GridRepeatTrack>),
}Expand description
Represents a track sizing function or a list of line names between tracks
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LineNames(Vec<String>)
A list of line names that apply to the current grid line (e.g., [a b])
Single(GridTrackSize)
A single non-repeated track
Repeat(GridRepetitionCount, Vec<GridRepeatTrack>)
Automatically generate grid tracks to fit the available space using the specified definite track lengths Only valid if every track in template (not just the repetition) has a fixed size.
Trait Implementations§
Source§impl Clone for GridTemplateComponent
impl Clone for GridTemplateComponent
Source§fn clone(&self) -> GridTemplateComponent
fn clone(&self) -> GridTemplateComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GridTemplateComponent
impl Debug for GridTemplateComponent
Source§impl<'i> FromCss<'i> for GridTemplateComponent
impl<'i> FromCss<'i> for GridTemplateComponent
Source§const VALID_TOKENS: &'static [CssToken]
const VALID_TOKENS: &'static [CssToken]
Returns the list of valid CSS tokens for this type.
Source§fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
Parses the type from a
Parser instance.Source§fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
fn from_str(source: &'i str) -> ParseResult<'i, Self>where
Self: Sized,
Helper function to parse the type from a string.
Source§const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
const EXPECT_MESSAGE: CssExpectedMessage = CssExpectedMessage::OneValue
Message template used when building parse errors for this type.
Source§impl PartialEq for GridTemplateComponent
impl PartialEq for GridTemplateComponent
Source§fn eq(&self, other: &GridTemplateComponent) -> bool
fn eq(&self, other: &GridTemplateComponent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GridTemplateComponent
Auto Trait Implementations§
impl Freeze for GridTemplateComponent
impl RefUnwindSafe for GridTemplateComponent
impl Send for GridTemplateComponent
impl Sync for GridTemplateComponent
impl Unpin for GridTemplateComponent
impl UnsafeUnpin for GridTemplateComponent
impl UnwindSafe for GridTemplateComponent
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