pub(crate) type GridLine = GenericGridLine<i32>;
Expand description
The computed value of a <grid-line>
.
Aliased Type§
struct GridLine {
pub ident: CustomIdent,
pub line_num: i32,
pub is_span: bool,
}
Fields§
§ident: CustomIdent
A custom identifier for named lines, or the empty atom otherwise.
line_num: i32
Denotes the nth grid line from grid item’s placement.
This is clamped by MIN_GRID_LINE and MAX_GRID_LINE.
NOTE(emilio): If we ever allow animating these we need to either do something more complicated for the clamping, or do this clamping at used-value time.
is_span: bool
Flag to check whether it’s a span
keyword.
Implementations
Source§impl<Integer> GenericGridLine<Integer>
impl<Integer> GenericGridLine<Integer>
Sourcepub fn auto() -> GenericGridLine<Integer>
pub fn auto() -> GenericGridLine<Integer>
The auto
value.
Sourcepub fn is_ident_only(&self) -> bool
pub fn is_ident_only(&self) -> bool
Check whether this <grid-line>
represents a <custom-ident>
value.
Sourcepub fn can_omit(&self, other: &GenericGridLine<Integer>) -> bool
pub fn can_omit(&self, other: &GenericGridLine<Integer>) -> bool
Check if self
makes other
omittable according to the rules at:
https://drafts.csswg.org/css-grid/#propdef-grid-column
https://drafts.csswg.org/css-grid/#propdef-grid-area
Trait Implementations
Source§impl<Integer> Clone for GenericGridLine<Integer>where
Integer: Clone,
impl<Integer> Clone for GenericGridLine<Integer>where
Integer: Clone,
Source§fn clone(&self) -> GenericGridLine<Integer>
fn clone(&self) -> GenericGridLine<Integer>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Integer> Debug for GenericGridLine<Integer>where
Integer: Debug,
impl<Integer> Debug for GenericGridLine<Integer>where
Integer: Debug,
Source§impl<Integer> Default for GenericGridLine<Integer>where
Integer: Default,
impl<Integer> Default for GenericGridLine<Integer>where
Integer: Default,
Source§fn default() -> GenericGridLine<Integer>
fn default() -> GenericGridLine<Integer>
Returns the “default value” for a type. Read more
Source§impl<Integer> MallocSizeOf for GenericGridLine<Integer>where
Integer: MallocSizeOf,
impl<Integer> MallocSizeOf for GenericGridLine<Integer>where
Integer: MallocSizeOf,
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl<Integer> PartialEq for GenericGridLine<Integer>where
Integer: PartialEq,
impl<Integer> PartialEq for GenericGridLine<Integer>where
Integer: PartialEq,
Source§impl<Integer> SpecifiedValueInfo for GenericGridLine<Integer>where
Integer: SpecifiedValueInfo,
impl<Integer> SpecifiedValueInfo for GenericGridLine<Integer>where
Integer: SpecifiedValueInfo,
Source§const SUPPORTED_TYPES: u8
const SUPPORTED_TYPES: u8
Supported CssTypes by the given value type. Read more
Source§impl<Integer> ToComputedValue for GenericGridLine<Integer>where
Integer: ToComputedValue,
impl<Integer> ToComputedValue for GenericGridLine<Integer>where
Integer: ToComputedValue,
Source§type ComputedValue = GenericGridLine<<Integer as ToComputedValue>::ComputedValue>
type ComputedValue = GenericGridLine<<Integer as ToComputedValue>::ComputedValue>
The computed value type we’re going to be converted to.
Source§fn from_computed_value(
from: &<GenericGridLine<Integer> as ToComputedValue>::ComputedValue,
) -> GenericGridLine<Integer>
fn from_computed_value( from: &<GenericGridLine<Integer> as ToComputedValue>::ComputedValue, ) -> GenericGridLine<Integer>
Convert a computed value to specified value form. Read more
Source§fn to_computed_value(
&self,
context: &Context<'_>,
) -> <GenericGridLine<Integer> as ToComputedValue>::ComputedValue
fn to_computed_value( &self, context: &Context<'_>, ) -> <GenericGridLine<Integer> as ToComputedValue>::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.Source§impl<Integer> ToCss for GenericGridLine<Integer>
impl<Integer> ToCss for GenericGridLine<Integer>
Source§impl<Integer> ToResolvedValue for GenericGridLine<Integer>where
Integer: ToResolvedValue,
impl<Integer> ToResolvedValue for GenericGridLine<Integer>where
Integer: ToResolvedValue,
Source§type ResolvedValue = GenericGridLine<<Integer as ToResolvedValue>::ResolvedValue>
type ResolvedValue = GenericGridLine<<Integer as ToResolvedValue>::ResolvedValue>
The resolved value type we’re going to be converted to.
Source§fn from_resolved_value(
from: <GenericGridLine<Integer> as ToResolvedValue>::ResolvedValue,
) -> GenericGridLine<Integer>
fn from_resolved_value( from: <GenericGridLine<Integer> as ToResolvedValue>::ResolvedValue, ) -> GenericGridLine<Integer>
Convert a resolved value to resolved value form.
Source§fn to_resolved_value(
self,
context: &Context<'_>,
) -> <GenericGridLine<Integer> as ToResolvedValue>::ResolvedValue
fn to_resolved_value( self, context: &Context<'_>, ) -> <GenericGridLine<Integer> as ToResolvedValue>::ResolvedValue
Convert a resolved value to a resolved value.
Source§impl<Integer> ToShmem for GenericGridLine<Integer>where
Integer: ToShmem,
impl<Integer> ToShmem for GenericGridLine<Integer>where
Integer: ToShmem,
Source§fn to_shmem(
&self,
builder: &mut SharedMemoryBuilder,
) -> Result<ManuallyDrop<GenericGridLine<Integer>>, String>
fn to_shmem( &self, builder: &mut SharedMemoryBuilder, ) -> Result<ManuallyDrop<GenericGridLine<Integer>>, String>
Clones this value into a form suitable for writing into a
SharedMemoryBuilder. Read more