pub trait GenericRepetition {
type CustomIdent: CheapCloneStr;
type RepetitionTrackList<'a>: Iterator<Item = TrackSizingFunction> + 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§
Sourcetype CustomIdent: CheapCloneStr
type CustomIdent: CheapCloneStr
The type that represents <custom-ident>
s (for named lines)
Sourcetype RepetitionTrackList<'a>: Iterator<Item = TrackSizingFunction> + ExactSizeIterator + Clone
where
Self: 'a
type RepetitionTrackList<'a>: Iterator<Item = TrackSizingFunction> + ExactSizeIterator + Clone where Self: 'a
The type which represents an iterator over the list of repeated tracks
Sourcetype 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§
Sourcefn count(&self) -> RepetitionCount
fn count(&self) -> RepetitionCount
The repetition count (integer, auto-fill, or auto-fit)
Sourcefn tracks(&self) -> Self::RepetitionTrackList<'_>
fn tracks(&self) -> Self::RepetitionTrackList<'_>
Get an iterator over the repeated tracks
Sourcefn lines_names(&self) -> Self::TemplateLineNames<'_>
fn lines_names(&self) -> Self::TemplateLineNames<'_>
Returns an iterator over the lines names
Provided Methods§
Sourcefn 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.