pub struct Rect<T> {
pub origin: Point<T>,
pub size: Size<T>,
}Fields§
§origin: Point<T>§size: Size<T>Implementations§
Source§impl<T> Rect<T>
impl<T> Rect<T>
pub const fn new(origin: Point<T>, size: Size<T>) -> Rect<T>
pub fn is_empty(self) -> bool
pub fn contains_point(self, point: Point<T>) -> bool
pub fn contains_point_inclusive(self, point: Point<T>) -> bool
pub fn contains_rect(self, other: Rect<T>) -> bool
pub fn min(self) -> Point<T>where
T: Copy,
pub fn max(self) -> Point<T>
pub fn pad(self, padding: impl Into<Size<T>>) -> Rect<T>
pub fn unpad(self, padding: impl Into<Size<T>>) -> Rect<T>
pub fn apply_transform(self, t: Transform<T>) -> Rect<T>
pub fn union(self, other: impl Into<Rect<T>>) -> Rect<T>
Trait Implementations§
impl<T> Copy for Rect<T>where
T: Copy,
impl<T> Eq for Rect<T>where
T: Eq,
impl<T> StructuralPartialEq for Rect<T>
Auto Trait Implementations§
impl<T> Freeze for Rect<T>where
T: Freeze,
impl<T> RefUnwindSafe for Rect<T>where
T: RefUnwindSafe,
impl<T> Send for Rect<T>where
T: Send,
impl<T> Sync for Rect<T>where
T: Sync,
impl<T> Unpin for Rect<T>where
T: Unpin,
impl<T> UnwindSafe for Rect<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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