pub struct Rectangle { /* private fields */ }
Implementations§
Source§impl Rectangle
impl Rectangle
pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rectangle
pub fn get_point(&self) -> Point
pub fn get_dimension(&self) -> Dimension
pub fn move_x(&mut self, amount_x: i32)
pub fn move_y(&mut self, amount_y: i32)
pub fn move_xy(&mut self, amount: Point)
pub fn x(&self) -> i32
pub fn y(&self) -> i32
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn is_colliding(&self, other_rectangle: Rectangle) -> bool
pub fn is_not_colliding(&self, other_rectangle: Rectangle) -> bool
pub fn y_max(&self) -> i32
pub fn x_max(&self) -> i32
pub fn y_min(&self) -> i32
pub fn x_min(&self) -> i32
Trait Implementations§
impl Copy for Rectangle
impl Eq for Rectangle
impl StructuralPartialEq for Rectangle
Auto Trait Implementations§
impl Freeze for Rectangle
impl RefUnwindSafe for Rectangle
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnwindSafe for Rectangle
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