pub struct Rect { /* private fields */ }Expand description
An axis-aligned rectangle defined by its top-left corner and dimensions.
Implementations§
Source§impl Rect
Implements methods for Rect.
impl Rect
Implements methods for Rect.
Sourcepub fn intersects(&self, other: Rect) -> bool
pub fn intersects(&self, other: Rect) -> bool
Source§impl Rect
impl Rect
pub fn get_x(&self) -> f64
pub fn get_mut_x(&mut self) -> &mut f64
pub fn set_x(&mut self, val: f64) -> &mut Self
pub fn get_y(&self) -> f64
pub fn get_mut_y(&mut self) -> &mut f64
pub fn set_y(&mut self, val: f64) -> &mut Self
pub fn get_width(&self) -> f64
pub fn get_mut_width(&mut self) -> &mut f64
pub fn set_width(&mut self, val: f64) -> &mut Self
pub fn get_height(&self) -> f64
pub fn get_mut_height(&mut self) -> &mut f64
pub fn set_height(&mut self, val: f64) -> &mut Self
Trait Implementations§
impl Copy for Rect
Source§impl PartialOrd for Rect
impl PartialOrd for Rect
impl StructuralPartialEq for Rect
Auto Trait Implementations§
impl Freeze for Rect
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnsafeUnpin for Rect
impl UnwindSafe for Rect
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