Trait GenericRepetition
pub trait GenericRepetition {
type CustomIdent: CheapCloneStr;
type RepetitionTrackList<'a>: Iterator<Item = MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> + ExactSizeIterator + Clone
where Self: 'a;
type TemplateLineNames<'a>: TemplateLineNames<'a, Self::CustomIdent>
where Self: 'a;
// Required methods
fn count(&self) -> RepetitionCount;
fn tracks(&self) -> Self::RepetitionTrackList<'_>;
fn lines_names(&self) -> Self::TemplateLineNames<'_>;
// Provided method
fn track_count(&self) -> u16 { ... }
}Expand description
A trait to represent a repeat() clause in a grid-template-* definition
Required Associated Types§
type CustomIdent: CheapCloneStr
type CustomIdent: CheapCloneStr
The type that represents <custom-ident>s (for named lines)
type RepetitionTrackList<'a>: Iterator<Item = MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> + ExactSizeIterator + Clone
where
Self: 'a
type RepetitionTrackList<'a>: Iterator<Item = MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> + ExactSizeIterator + Clone where Self: 'a
The type which represents an iterator over the list of repeated tracks
type TemplateLineNames<'a>: TemplateLineNames<'a, Self::CustomIdent>
where
Self: 'a
type TemplateLineNames<'a>: TemplateLineNames<'a, Self::CustomIdent> where Self: 'a
A nested iterator of line names (nested because each line may have multiple associated names)
Required Methods§
fn count(&self) -> RepetitionCount
fn count(&self) -> RepetitionCount
The repetition count (integer, auto-fill, or auto-fit)
fn tracks(&self) -> Self::RepetitionTrackList<'_>
fn tracks(&self) -> Self::RepetitionTrackList<'_>
Get an iterator over the repeated tracks
fn lines_names(&self) -> Self::TemplateLineNames<'_>
fn lines_names(&self) -> Self::TemplateLineNames<'_>
Returns an iterator over the lines names
Provided Methods§
fn track_count(&self) -> u16
fn track_count(&self) -> u16
Returns the number of repeated tracks
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.