pub struct Rectangle<T = f32> {
pub x: T,
pub y: T,
pub width: T,
pub height: T,
}
Expand description
A rectangle.
Fields
x: T
X coordinate of the top-left corner.
y: T
Y coordinate of the top-left corner.
width: T
Width of the rectangle.
height: T
Height of the rectangle.
Implementations
sourceimpl Rectangle<f32>
impl Rectangle<f32>
Trait Implementations
impl<T> Copy for Rectangle<T> where
T: Copy,
impl<T> Eq for Rectangle<T> where
T: Eq,
impl<T> StructuralEq for Rectangle<T>
impl<T> StructuralPartialEq for Rectangle<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Rectangle<T> where
T: RefUnwindSafe,
impl<T> Send for Rectangle<T> where
T: Send,
impl<T> Sync for Rectangle<T> where
T: Sync,
impl<T> Unpin for Rectangle<T> where
T: Unpin,
impl<T> UnwindSafe for Rectangle<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> IsDefault for T where
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for T where
T: Default + PartialEq<T> + Copy,
fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more