#[non_exhaustive]pub enum GridLength {
Fr(f32),
Unit(Length),
}Expand description
Represents a grid track sizing function with serde support
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.
Implementations§
Source§impl GridLength
impl GridLength
Sourcepub fn to_compact_length(self, sizing: &SizingContext) -> CompactLength
pub fn to_compact_length(self, sizing: &SizingContext) -> CompactLength
Converts the grid track size to a compact length representation.
Trait Implementations§
Source§impl Clone for GridLength
impl Clone for GridLength
Source§fn clone(&self) -> GridLength
fn clone(&self) -> GridLength
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 moreimpl Copy for GridLength
Source§impl Debug for GridLength
impl Debug for GridLength
Source§impl<'i> FromCss<'i> for GridLength
impl<'i> FromCss<'i> for GridLength
Source§const VALID_TOKENS: &'static [CssToken] = Length<true>::VALID_TOKENS
const VALID_TOKENS: &'static [CssToken] = Length<true>::VALID_TOKENS
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 GridLength
impl PartialEq for GridLength
Source§fn eq(&self, other: &GridLength) -> bool
fn eq(&self, other: &GridLength) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GridLength
Auto Trait Implementations§
impl Freeze for GridLength
impl RefUnwindSafe for GridLength
impl Send for GridLength
impl Sync for GridLength
impl Unpin for GridLength
impl UnsafeUnpin for GridLength
impl UnwindSafe for GridLength
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