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) -> EdgeInsets
pub fn horizontal(horizontal: f32) -> EdgeInsets
pub fn vertical(vertical: f32) -> EdgeInsets
pub fn symmetric(horizontal: f32, vertical: f32) -> EdgeInsets
pub fn from_components( left: f32, top: f32, right: f32, bottom: f32, ) -> EdgeInsets
pub fn is_zero(&self) -> bool
pub fn horizontal_sum(&self) -> f32
pub fn vertical_sum(&self) -> f32
Trait Implementations§
Source§impl AddAssign for EdgeInsets
impl AddAssign for EdgeInsets
Source§fn add_assign(&mut self, rhs: EdgeInsets)
fn add_assign(&mut self, rhs: EdgeInsets)
Performs the
+= operation. Read moreSource§impl Clone for EdgeInsets
impl Clone for EdgeInsets
Source§fn clone(&self) -> EdgeInsets
fn clone(&self) -> EdgeInsets
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EdgeInsets
impl Debug for EdgeInsets
Source§impl Default for EdgeInsets
impl Default for EdgeInsets
Source§fn default() -> EdgeInsets
fn default() -> EdgeInsets
Returns the “default value” for a type. Read more
Source§impl PartialEq for EdgeInsets
impl PartialEq for EdgeInsets
impl Copy 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 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