pub struct Size { /* private fields */ }Expand description
The size of a Grid, defined by x and y.
The size of the Grid is defined so that the following can actually be drawn on the grid:
ⓘ
assert_eq!(grid.size(), Size::new(1024, 768));
let pixel: Pixel = "PX 1023 767 ff0f00".parse()?;
grid.draw(pixel);The following is not working because it is out of bounds:
ⓘ
assert_eq!(grid.size(), Size::new(1024, 768));
let pixel: Pixel = "PX 1024 768 ff0f00".parse()?;
grid.draw(pixel);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