Type Alias TrackSizingFunction

Source
pub type TrackSizingFunction = MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>;
Expand description

The sizing function for a grid track (row/column)

May either be a MinMax variant which specifies separate values for the min-/max- track sizing functions or a scalar value which applies to both track sizing functions.

Aliased Type§

pub struct TrackSizingFunction {
    pub min: MinTrackSizingFunction,
    pub max: MaxTrackSizingFunction,
}

Fields§

§min: MinTrackSizingFunction

The value representing the minimum

§max: MaxTrackSizingFunction

The value representing the maximum

Implementations§

Source§

impl TrackSizingFunction

Source

pub fn min_sizing_function(&self) -> MinTrackSizingFunction

Extract the min track sizing function

Source

pub fn max_sizing_function(&self) -> MaxTrackSizingFunction

Extract the max track sizing function

Source

pub fn has_fixed_component(&self) -> bool

Determine whether at least one of the components (“min” and “max”) are fixed sizing function

Trait Implementations§

Source§

impl From<Dimension> for TrackSizingFunction

Source§

fn from(input: Dimension) -> Self

Converts to this type from the input type.
Source§

impl From<LengthPercentage> for TrackSizingFunction

Source§

fn from(input: LengthPercentage) -> Self

Converts to this type from the input type.
Source§

impl From<LengthPercentageAuto> for TrackSizingFunction

Source§

fn from(input: LengthPercentageAuto) -> Self

Converts to this type from the input type.
Source§

impl FromFr for TrackSizingFunction

Source§

fn from_fr<Input: Into<f32> + Copy>(flex: Input) -> Self

Converts into an Into<f32> into Self
Source§

impl FromLength for TrackSizingFunction

Source§

fn from_length<Input: Into<f32> + Copy>(value: Input) -> Self

Converts into an Into<f32> into Self
Source§

impl FromPercent for TrackSizingFunction

Source§

fn from_percent<Input: Into<f32> + Copy>(percent: Input) -> Self

Converts into an Into<f32> into Self
Source§

impl TaffyAuto for TrackSizingFunction

Source§

const AUTO: Self

The auto value for type implementing TaffyAuto
Source§

impl TaffyFitContent for TrackSizingFunction

Source§

fn fit_content(argument: LengthPercentage) -> Self

Converts a LengthPercentage into Self
Source§

impl TaffyMaxContent for TrackSizingFunction

Source§

const MAX_CONTENT: Self

The max_content value for type implementing TaffyZero
Source§

impl TaffyMinContent for TrackSizingFunction

Source§

const MIN_CONTENT: Self

The min_content value for type implementing TaffyZero
Source§

impl TaffyZero for TrackSizingFunction

Source§

const ZERO: Self

The zero value for type implementing TaffyZero