Enum GridTemplateComponent

Source
pub enum GridTemplateComponent<S: CheapCloneStr> {
    Single(TrackSizingFunction),
    Repeat(GridTemplateRepetition<S>),
}
Expand description

An element in a grid-template-columns or grid-template-rows definition. Either a track sizing function or a repeat().

See https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns

Variants§

§

Single(TrackSizingFunction)

A single non-repeated track

§

Repeat(GridTemplateRepetition<S>)

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.

Implementations§

Source§

impl<S: CheapCloneStr> GridTemplateComponent<S>

Source

pub fn as_component_ref( &self, ) -> GenericGridTemplateComponent<S, &GridTemplateRepetition<S>>

Convert a GridTemplateComponent into a GridTemplateComponentRef

Source§

impl<S: CheapCloneStr> GridTemplateComponent<S>

Source

pub fn is_auto_repetition(&self) -> bool

Whether the track definition is a auto-repeated fragment

Trait Implementations§

Source§

impl<S: Clone + CheapCloneStr> Clone for GridTemplateComponent<S>

Source§

fn clone(&self) -> GridTemplateComponent<S>

Returns a duplicate 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<S: Debug + CheapCloneStr> Debug for GridTemplateComponent<S>

Source§

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

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

impl<S: CheapCloneStr> From<MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> for GridTemplateComponent<S>

Source§

fn from(input: MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>) -> Self

Converts to this type from the input type.
Source§

impl<S: CheapCloneStr> FromFr for GridTemplateComponent<S>

Source§

fn from_fr<Input: Into<f32> + Copy>(flex: Input) -> Self

Converts into an Into<f32> into Self
Source§

impl<S: CheapCloneStr> FromLength for GridTemplateComponent<S>

Source§

fn from_length<Input: Into<f32> + Copy>(value: Input) -> Self

Converts into an Into<f32> into Self
Source§

impl<S: CheapCloneStr> FromPercent for GridTemplateComponent<S>

Source§

fn from_percent<Input: Into<f32> + Copy>(percent: Input) -> Self

Converts into an Into<f32> into Self
Source§

impl<S: PartialEq + CheapCloneStr> PartialEq for GridTemplateComponent<S>

Source§

fn eq(&self, other: &GridTemplateComponent<S>) -> 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<S: CheapCloneStr> TaffyAuto for GridTemplateComponent<S>

Source§

const AUTO: Self

The auto value for type implementing TaffyAuto
Source§

impl<S: CheapCloneStr> TaffyFitContent for GridTemplateComponent<S>

Source§

fn fit_content(argument: LengthPercentage) -> Self

Converts a LengthPercentage into Self
Source§

impl<S: CheapCloneStr> TaffyMaxContent for GridTemplateComponent<S>

Source§

const MAX_CONTENT: Self

The max_content value for type implementing TaffyZero
Source§

impl<S: CheapCloneStr> TaffyMinContent for GridTemplateComponent<S>

Source§

const MIN_CONTENT: Self

The min_content value for type implementing TaffyZero
Source§

impl<S: CheapCloneStr> TaffyZero for GridTemplateComponent<S>

Source§

const ZERO: Self

The zero value for type implementing TaffyZero
Source§

impl<S: CheapCloneStr> StructuralPartialEq for GridTemplateComponent<S>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.