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: f32§bottom: f32§left: f32§top: f32Implementations§
Source§impl Padding
impl Padding
Sourcepub fn hv(horizontal: f32, vertical: f32) -> Self
pub fn hv(horizontal: f32, vertical: f32) -> Self
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.
Sourcepub fn right(amount: f32) -> Self
pub fn right(amount: f32) -> Self
Creates the given amount of right padding. All other sides are set to 0.0.
Sourcepub fn bottom(amount: f32) -> Self
pub fn bottom(amount: f32) -> Self
Creates the given amount of bottom padding. All other sides are set to 0.0.
Trait Implementations§
impl Copy for Padding
impl StructuralPartialEq for Padding
Auto Trait Implementations§
impl Freeze for Padding
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe for Padding
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