pub struct Rectangle<Space: CoordinateSpace> {
pub top_left: Coordinates<Space>,
pub bottom_right: Coordinates<Space>,
}
Fields§
§top_left: Coordinates<Space>
§bottom_right: Coordinates<Space>
Implementations§
Source§impl<Space: CoordinateSpace> Rectangle<Space>
impl<Space: CoordinateSpace> Rectangle<Space>
pub const fn new( top_left: Coordinates<Space>, bottom_right: Coordinates<Space>, ) -> Self
pub fn rotated(&self, rotation: u8) -> Self
pub const fn everything() -> Self
pub fn width(&self) -> Space::Data
pub fn height(&self) -> Space::Data
pub const fn left(&self) -> Space::Data
pub const fn top(&self) -> Space::Data
pub const fn right(&self) -> Space::Data
pub const fn bottom(&self) -> Space::Data
Trait Implementations§
Source§impl<Space: PartialOrd + CoordinateSpace> PartialOrd for Rectangle<Space>
impl<Space: PartialOrd + CoordinateSpace> PartialOrd for Rectangle<Space>
impl<Space: Copy + CoordinateSpace> Copy for Rectangle<Space>
impl<Space: Eq + CoordinateSpace> Eq for Rectangle<Space>
impl<Space: CoordinateSpace> StructuralPartialEq for Rectangle<Space>
Auto Trait Implementations§
impl<Space> Freeze for Rectangle<Space>
impl<Space> RefUnwindSafe for Rectangle<Space>
impl<Space> Send for Rectangle<Space>
impl<Space> Sync for Rectangle<Space>
impl<Space> Unpin for Rectangle<Space>
impl<Space> UnwindSafe for Rectangle<Space>
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