pub struct Size { /* private fields */ }
Expand description
A Size
specified by width and height.
§Examples
let size = Size::new(10., 10.);
let other_size = Size::new(5., 7.);
let result = size - other_size;
assert_eq!(result.width(), 5.);
assert_eq!(result.height(), 3.);
Implementations§
Trait Implementations§
impl Copy for Size
impl StructuralPartialEq for Size
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