pub struct Rect<T> {
pub x: T,
pub y: T,
pub width: T,
pub height: T,
}Fields§
§x: T§y: T§width: T§height: TImplementations§
Source§impl<T: Scalar> Rect<T>
impl<T: Scalar> Rect<T>
pub fn contains(self, point: Point<T>) -> bool
pub fn outset(self, sides: Sides<T>) -> Self
pub fn inset(self, padding: Sides<T>) -> Self
pub fn intersection(self, other: Self) -> Option<Self>
pub fn touches(self, other: Self) -> bool
pub fn union(self, other: Self) -> Self
Source§impl Rect<f32>
impl Rect<f32>
pub fn to_physical(self, scale: Scale2) -> PhysicalRect
Trait Implementations§
impl<T: Copy> Copy for Rect<T>
impl<T: Eq> Eq for Rect<T>
impl<T: PartialEq> StructuralPartialEq for Rect<T>
Auto Trait Implementations§
impl<T> Forget for Rect<T>
impl<T> Freeze for Rect<T>where
T: Freeze,
impl<T> Move for Rect<T>
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> UnsafeUnpin for Rect<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Rect<T>where
T: UnwindSafe,
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