pub struct EdgeInsets {
pub left: f32,
pub top: f32,
pub right: f32,
pub bottom: f32,
}Expand description
Padding values for each edge of a rectangle.
Fields§
§left: f32§top: f32§right: f32§bottom: f32Implementations§
Source§impl EdgeInsets
impl EdgeInsets
pub fn uniform(all: f32) -> Self
pub fn horizontal(horizontal: f32) -> Self
pub fn vertical(vertical: f32) -> Self
pub fn symmetric(horizontal: f32, vertical: f32) -> Self
pub fn from_components(left: f32, top: f32, right: f32, bottom: f32) -> Self
pub fn is_zero(&self) -> bool
pub fn horizontal_sum(&self) -> f32
pub fn vertical_sum(&self) -> f32
Sourcepub fn inset_rect(&self, size: Size) -> Rect
pub fn inset_rect(&self, size: Size) -> Rect
The part of a size rect these insets leave, at the leading insets;
it never shrinks below zero.
Trait Implementations§
Source§impl AddAssign for EdgeInsets
impl AddAssign for EdgeInsets
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for EdgeInsets
impl Clone for EdgeInsets
impl Copy for EdgeInsets
Source§impl Debug for EdgeInsets
impl Debug for EdgeInsets
Source§impl Default for EdgeInsets
impl Default for EdgeInsets
Source§impl PartialEq for EdgeInsets
impl PartialEq for EdgeInsets
impl StructuralPartialEq for EdgeInsets
Auto Trait Implementations§
impl Freeze for EdgeInsets
impl RefUnwindSafe for EdgeInsets
impl Send for EdgeInsets
impl Sync for EdgeInsets
impl Unpin for EdgeInsets
impl UnsafeUnpin for EdgeInsets
impl UnwindSafe for EdgeInsets
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