pub struct MarginF32 {
pub left: f32,
pub right: f32,
pub top: f32,
pub bottom: f32,
}
Expand description
A value for all four sides of a rectangle, often used to express padding or spacing.
Can be added and subtracted to/from Rect
s.
For storage, use crate::Margin
instead.
Fields§
§left: f32
§right: f32
§top: f32
§bottom: f32
Implementations§
Source§impl MarginF32
impl MarginF32
Trait Implementations§
Source§impl AddAssign<MarginF32> for Rect
Rect += MarginF32
impl AddAssign<MarginF32> for Rect
Rect += MarginF32
Source§fn add_assign(&mut self, margin: MarginF32)
fn add_assign(&mut self, margin: MarginF32)
Performs the
+=
operation. Read moreSource§impl AddAssign<f32> for MarginF32
Margind += f32
impl AddAssign<f32> for MarginF32
Margind += f32
Source§fn add_assign(&mut self, v: f32)
fn add_assign(&mut self, v: f32)
Performs the
+=
operation. Read moreSource§impl DivAssign<f32> for MarginF32
MarginF32 /= f32
impl DivAssign<f32> for MarginF32
MarginF32 /= f32
Source§fn div_assign(&mut self, v: f32)
fn div_assign(&mut self, v: f32)
Performs the
/=
operation. Read moreSource§impl MulAssign<f32> for MarginF32
MarginF32 *= f32
impl MulAssign<f32> for MarginF32
MarginF32 *= f32
Source§fn mul_assign(&mut self, v: f32)
fn mul_assign(&mut self, v: f32)
Performs the
*=
operation. Read moreSource§impl SubAssign<MarginF32> for Rect
Rect -= MarginF32
impl SubAssign<MarginF32> for Rect
Rect -= MarginF32
Source§fn sub_assign(&mut self, margin: MarginF32)
fn sub_assign(&mut self, margin: MarginF32)
Performs the
-=
operation. Read moreSource§impl SubAssign<f32> for MarginF32
MarginF32 -= f32
impl SubAssign<f32> for MarginF32
MarginF32 -= f32
Source§fn sub_assign(&mut self, v: f32)
fn sub_assign(&mut self, v: f32)
Performs the
-=
operation. Read moreimpl Copy for MarginF32
impl StructuralPartialEq for MarginF32
Auto Trait Implementations§
impl Freeze for MarginF32
impl RefUnwindSafe for MarginF32
impl Send for MarginF32
impl Sync for MarginF32
impl Unpin for MarginF32
impl UnwindSafe for MarginF32
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