pub enum Dimension {
    Absolute(Scalar),
    Of(IdOption<Scalar>),
    KidAreaOf(IdOption<Scalar>),
}
Expand description

The length of a Widget over either the x or y axes.

This type is used to represent the different ways in which a dimension may be sized.

See the Sizeable trait for methods that allow for setting the x and y Dimensions in various ways.

Note that Sizeable is implemented for all types that implement Widget.

Variants

Absolute(Scalar)

Some specific length has been given.

Of(IdOption<Scalar>)

The dimension should match that of the widget at the given index.

The Option<Scalar> is an optional padding argument which when Some, will subtract the scalar from both ends of the other widget’s dimension.

KidAreaOf(IdOption<Scalar>)

The dimension should match that of the kid_area of the widget at the given index.

The Option<Scalar> is an optional padding argument which when Some, will subtract the scalar from both ends of the other widget’s dimension.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.