Struct GridTemplateRepetition

Source
pub struct GridTemplateRepetition<S: CheapCloneStr> {
    pub count: RepetitionCount,
    pub tracks: Vec<TrackSizingFunction>,
    pub line_names: Vec<Vec<S>>,
}
Expand description

A typed representation of a repeat(..) in grid-template-* value

Fields§

§count: RepetitionCount

The number of the times the repeat is repeated

§tracks: Vec<TrackSizingFunction>

The tracks to repeat

§line_names: Vec<Vec<S>>

The line names for the repeated tracks

Trait Implementations§

Source§

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

Source§

fn clone(&self) -> GridTemplateRepetition<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 GridTemplateRepetition<S>

Source§

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

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

impl<S: CheapCloneStr> GenericRepetition for &GridTemplateRepetition<S>

Source§

type CustomIdent = S

The type that represents <custom-ident>s (for named lines)
Source§

type RepetitionTrackList<'a> = Copied<Iter<'a, MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>>> where Self: 'a

The type which represents an iterator over the list of repeated tracks
Source§

type TemplateLineNames<'a> = Map<Iter<'a, Vec<S>>, fn(&Vec<S>) -> Iter<'_, S>> where Self: 'a

A nested iterator of line names (nested because each line may have multiple associated names)
Source§

fn count(&self) -> RepetitionCount

The repetition count (integer, auto-fill, or auto-fit)
Source§

fn track_count(&self) -> u16

Returns the number of repeated tracks
Source§

fn tracks(&self) -> Self::RepetitionTrackList<'_>

Get an iterator over the repeated tracks
Source§

fn lines_names(&self) -> Self::TemplateLineNames<'_>

Returns an iterator over the lines names
Source§

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

Source§

fn eq(&self, other: &GridTemplateRepetition<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> StructuralPartialEq for GridTemplateRepetition<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.