pub struct TrackList(pub Vec<TrackComponent>);Expand description
A grid track list, as grid_template_columns writes it in CSS:
"1fr 2fr 120px", "repeat(3, minmax(100px, 1fr))",
"repeat(auto-fill, 160px)". Named lines are not supported.
Tuple Fields§
§0: Vec<TrackComponent>Implementations§
Source§impl TrackList
impl TrackList
Sourcepub fn track_count(&self) -> usize
pub fn track_count(&self) -> usize
How many explicit tracks it has with each count repeated (an automatic repeat counts once).
Sourcepub fn sizes(&self) -> impl Iterator<Item = TrackSize> + '_
pub fn sizes(&self) -> impl Iterator<Item = TrackSize> + '_
Every track size, once each, repeats included once.
Sourcepub fn lengths(&self) -> impl Iterator<Item = LayoutLength> + '_
pub fn lengths(&self) -> impl Iterator<Item = LayoutLength> + '_
Every length in it, for range checks.
Every fr share in it.
Sourcepub fn without_px(&self, shorter_side: f32) -> Self
pub fn without_px(&self, shorter_side: f32) -> Self
The same list with pixels turned into fractions.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TrackList
impl<'de> Deserialize<'de> for TrackList
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for TrackList
Auto Trait Implementations§
impl Freeze for TrackList
impl RefUnwindSafe for TrackList
impl Send for TrackList
impl Sync for TrackList
impl Unpin for TrackList
impl UnsafeUnpin for TrackList
impl UnwindSafe for TrackList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more