Struct style::values::generics::grid::TrackRepeat
[−]
[src]
pub struct TrackRepeat<L, I> { pub count: RepeatCount<I>, pub line_names: Box<[Box<[CustomIdent]>]>, pub track_sizes: Vec<TrackSize<L>>, }
The structure containing <line-names>
and <track-size>
values.
It can also hold repeat()
function parameters, which expands into the respective
values in its computed form.
Fields
count: RepeatCount<I>
The number of times for the value to be repeated (could also be auto-fit
or auto-fill
)
line_names: Box<[Box<[CustomIdent]>]>
<line-names>
accompanying <track_size>
values.
If there's no <line-names>
, then it's represented by an empty vector.
For N <track-size>
values, there will be N+1 <line-names>
, and so this vector's
length is always one value more than that of the <track-size>
.
track_sizes: Vec<TrackSize<L>>
<track-size>
values.
Methods
impl<L: Clone> TrackRepeat<L, Integer>
[src]
pub fn expand(&self) -> Self
[src]
If the repeat count is numeric, then expand the values and merge accordingly.
Trait Implementations
impl<L: Clone, I: Clone> Clone for TrackRepeat<L, I>
[src]
fn clone(&self) -> TrackRepeat<L, I>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<L: Debug, I: Debug> Debug for TrackRepeat<L, I>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<L, I> MallocSizeOf for TrackRepeat<L, I> where
L: MallocSizeOf,
I: MallocSizeOf,
[src]
L: MallocSizeOf,
I: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
impl<L: PartialEq, I: PartialEq> PartialEq for TrackRepeat<L, I>
[src]
fn eq(&self, __arg_0: &TrackRepeat<L, I>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TrackRepeat<L, I>) -> bool
[src]
This method tests for !=
.
impl<L, I> ToComputedValue for TrackRepeat<L, I> where
RepeatCount<I>: ToComputedValue<ComputedValue = RepeatCount<<I as ToComputedValue>::ComputedValue>>,
I: ToComputedValue,
Vec<TrackSize<L>>: ToComputedValue<ComputedValue = Vec<TrackSize<<L as ToComputedValue>::ComputedValue>>>,
L: ToComputedValue,
[src]
RepeatCount<I>: ToComputedValue<ComputedValue = RepeatCount<<I as ToComputedValue>::ComputedValue>>,
I: ToComputedValue,
Vec<TrackSize<L>>: ToComputedValue<ComputedValue = Vec<TrackSize<<L as ToComputedValue>::ComputedValue>>>,
L: ToComputedValue,
type ComputedValue = TrackRepeat<<L as ToComputedValue>::ComputedValue, <I as ToComputedValue>::ComputedValue>
The computed value type we're going to be converted to.
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue
[src]
Convert a specified value to a computed value, using itself and the data inside the Context
. Read more
fn from_computed_value(computed: &Self::ComputedValue) -> Self
[src]
Convert a computed value to specified value form. Read more