layout_2020::taffy::stylo_taffy::convert::stylo

Type Alias GridLine

Source
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.

https://drafts.csswg.org/css-grid/#grid-placement-slot

§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>
where Integer: PartialEq + Zero,

Source

pub fn auto() -> GenericGridLine<Integer>

The auto value.

Source

pub fn is_auto(&self) -> bool

Check whether this <grid-line> represents an auto value.

Source

pub fn is_ident_only(&self) -> bool

Check whether this <grid-line> represents a <custom-ident> value.

Source

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,

Source§

fn clone(&self) -> GenericGridLine<Integer>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Integer> Debug for GenericGridLine<Integer>
where Integer: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<Integer> Default for GenericGridLine<Integer>
where Integer: Default,

Source§

fn default() -> GenericGridLine<Integer>

Returns the “default value” for a type. Read more
Source§

impl<Integer> MallocSizeOf for GenericGridLine<Integer>
where Integer: MallocSizeOf,

Source§

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,

Source§

fn eq(&self, other: &GenericGridLine<Integer>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Integer> SpecifiedValueInfo for GenericGridLine<Integer>
where Integer: SpecifiedValueInfo,

Source§

const SUPPORTED_TYPES: u8

Supported CssTypes by the given value type. Read more
Source§

fn collect_completion_keywords(_f: &mut dyn FnMut(&[&'static str]))

Collect value starting words for the given specified value type. This includes keyword and function names which can appear at the beginning of a value of this type. Read more
Source§

impl<Integer> ToComputedValue for GenericGridLine<Integer>
where Integer: ToComputedValue,

Source§

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>

Convert a computed value to specified value form. Read more
Source§

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>
where Integer: ToCss + PartialEq + Zero + One,

Source§

fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Result<(), Error>
where W: Write,

Serialize self in CSS syntax, writing to dest.
Source§

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more
Source§

impl<Integer> ToResolvedValue for GenericGridLine<Integer>
where Integer: ToResolvedValue,

Source§

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>

Convert a resolved value to resolved value form.
Source§

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,

Source§

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
Source§

impl<Integer> StructuralPartialEq for GenericGridLine<Integer>