pub struct Size {
pub w: u32,
pub h: u32,
}
Fields§
§w: u32
§h: u32
Implementations§
Source§impl Size
impl Size
pub const ZERO: Size
pub const fn new(w: u32, h: u32) -> Self
pub fn flip(&mut self) -> &Self
pub const fn max_side(&self) -> u32
pub const fn min_side(&self) -> u32
pub const fn area(&self) -> u64
pub const fn perimeter(&self) -> u64
pub fn pathological_mult(&self) -> f32
pub fn expand_with(&mut self, r: &Rect)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin 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