#[repr(C)]pub struct Size {
pub width: f32,
pub height: f32,
}Fields§
§width: f32§height: f32Implementations§
Source§impl Size
impl Size
pub const fn new(w: f32, h: f32) -> Size
pub const fn from_isize(src: ISize) -> Size
pub const fn new_empty() -> Size
pub fn set(&mut self, w: f32, h: f32)
pub fn equals(self, w: f32, h: f32) -> bool
pub fn to_round(self) -> ISize
pub fn to_ceil(self) -> ISize
pub fn to_floor(self) -> ISize
Trait Implementations§
Source§impl AddAssign<Size> for Point
impl AddAssign<Size> for Point
Source§fn add_assign(&mut self, rhs: Size)
fn add_assign(&mut self, rhs: Size)
Performs the
+= operation. Read moreimpl Copy for Size
Source§impl DivAssign<f32> for Size
impl DivAssign<f32> for Size
Source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/= operation. Read moreSource§impl MulAssign<f32> for Size
impl MulAssign<f32> for Size
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*= operation. Read moreimpl StructuralPartialEq for Size
Auto Trait Implementations§
impl Forget for Size
impl Freeze for Size
impl Move for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnsafeUnpin for Size
impl UnwindSafe for Size
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