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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more