pub struct Padding {
    pub right: f32,
    pub bottom: f32,
    pub left: f32,
    pub top: f32,
}
Expand description

Padding amounts.

Usually you don’t need to construct this directly, as this implements From for several types, and paws accepts impl Into<Padding> instead of just Padding in all functions.

Fields

right: f32bottom: f32left: f32top: f32

Implementations

Creates padding from horizontal and vertical amounts. This is equivalent constructing the padding where right and left are set to horizontal, and bottom and top are set to vertical.

Creates an even amount of padding for all sides.

Creates the given amount of right padding. All other sides are set to 0.0.

Creates the given amount of bottom padding. All other sides are set to 0.0.

Creates the given amount of left padding. All other sides are set to 0.0.

Creates the given amount of top padding. All other sides are set to 0.0.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The default amount of padding is 0.0 for all sides.

Creates padding from horizontal and vertical amounts. This is the same as calling Padding::hv(horizontal, vertical).

Creates the given amount of padding for all sides. This is the same as calling Padding::even(amount).

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.