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.
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
.
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 !=
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
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.
The type returned in the event of a conversion error.