pub enum TrackSizing {
Fixed(f32),
Fr(f32),
Auto,
MinMax(Box<TrackSizing>, Box<TrackSizing>),
MinContent,
MaxContent,
Repeat(usize, Box<TrackSizing>),
}Expand description
The sizing function for a single grid track.
Mirrors the CSS <track-size> value types from the Grid Level 1 spec.
Variants§
Fixed(f32)
A fixed pixel size: 100px.
Fr(f32)
A flexible fraction of the remaining free space: 1fr.
Auto
Size the track to its content; behaves as minmax(min-content, max-content).
MinMax(Box<TrackSizing>, Box<TrackSizing>)
minmax(min, max) — floor at min, ceiling at max.
MinContent
Shrink the track to the smallest size that avoids overflow (min-content).
MaxContent
Grow the track to the largest intrinsic size of its items (max-content).
Repeat(usize, Box<TrackSizing>)
Convenience: expand n repetitions of sizing into individual tracks.
Trait Implementations§
Source§impl Clone for TrackSizing
impl Clone for TrackSizing
Source§fn clone(&self) -> TrackSizing
fn clone(&self) -> TrackSizing
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TrackSizing
impl RefUnwindSafe for TrackSizing
impl Send for TrackSizing
impl Sync for TrackSizing
impl Unpin for TrackSizing
impl UnsafeUnpin for TrackSizing
impl UnwindSafe for TrackSizing
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