pub struct Rectangle { /* private fields */ }Expand description
An axis-aligned rectangle.
Implementations§
Source§impl Rectangle
impl Rectangle
Sourcepub const fn from_corners(a: Point2, b: Point2) -> Self
pub const fn from_corners(a: Point2, b: Point2) -> Self
Creates a rectangle from any two corners.
Sourcepub const fn from_bounds(bounds: Aabb2) -> Self
pub const fn from_bounds(bounds: Aabb2) -> Self
Creates a rectangle from bounds.
Trait Implementations§
impl Copy 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 UnsafeUnpin 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