Struct planar::Rect
[−]
[src]
pub struct Rect<T, Unit> { pub origin: Point<T, Unit>, pub size: Size<T, Unit>, }
Fields
origin: Point<T, Unit>
size: Size<T, Unit>
Methods
impl<T, Unit> Rect<T, Unit>
[src]
fn new(origin: Point<T, Unit>, size: Size<T, Unit>) -> Self
[src]
fn from_points<V>(origin: Point<T, Unit>, opposite: Point<V, Unit>) -> Self where
T: Clone,
V: Sub<T, Output = T>,
[src]
T: Clone,
V: Sub<T, Output = T>,
fn corner<W>(&self) -> Point<W, Unit> where
T: Clone + Add<T, Output = W>,
[src]
T: Clone + Add<T, Output = W>,
Trait Implementations
impl<T: Copy, Unit> Copy for Rect<T, Unit>
[src]
impl<T: Clone, Unit> Clone for Rect<T, Unit>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq, Unit> PartialEq for Rect<T, Unit>
[src]
fn eq(&self, other: &Self) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.