[][src]Struct gee::Rect

pub struct Rect<T> {
    pub left: T,
    pub top: T,
    pub right: T,
    pub bottom: T,
}

Fields

left: Ttop: Tright: Tbottom: T

Methods

impl<T> Rect<T>
[src]

pub fn new(left: T, top: T, right: T, bottom: T) -> Rect<T>
[src]

impl<T: Add<Output = T> + Copy> Rect<T>
[src]

pub fn from_point_size(origin: Point<T>, size: Size<T>) -> Rect<T>
[src]

impl<T: Copy> Rect<T>
[src]

pub fn origin(&self) -> Point<T>
[src]

pub fn top_left(&self) -> Point<T>
[src]

pub fn top_right(&self) -> Point<T>
[src]

pub fn bottom_left(&self) -> Point<T>
[src]

pub fn bottom_right(&self) -> Point<T>
[src]

impl<T: Copy + Sub> Rect<T>
[src]

pub fn size(&self) -> Size<T::Output>
[src]

impl<T: PartialOrd> Rect<T>
[src]

pub fn contains(&self, point: &Point<T>) -> bool
[src]

impl<T: Zero> Rect<T>
[src]

pub fn zero() -> Self
[src]

pub fn from_size(size: Size<T>) -> Self
[src]

impl<T: PartialEq> Rect<T>
[src]

pub fn is_empty(&self) -> bool
[src]

impl<T: Copy + PartialOrd + Zero> Rect<T>
[src]

pub fn from_points_iter<I>(points: I) -> Self where
    I: IntoIterator,
    I::Item: Borrow<Point<T>>, 
[src]

impl<T: Ord + Copy> Rect<T>
[src]

pub fn from_points(a: Point<T>, b: Point<T>) -> Self
[src]

impl<T: Copy + One + Add<Output = U>, U: Div> Rect<T>
[src]

pub fn center_x(&self) -> U::Output
[src]

pub fn center_y(&self) -> U::Output
[src]

pub fn center(&self) -> Point<U::Output>
[src]

impl<T: Copy + Ord + One + Add<Output = U>, U: Div<Output = T>> Rect<T>
[src]

pub fn top_center(&self) -> Point<T>
[src]

pub fn bottom_center(&self) -> Point<T>
[src]

pub fn center_left(&self) -> Point<T>
[src]

pub fn center_right(&self) -> Point<T>
[src]

impl<T: Ord + Copy> Rect<T>
[src]

pub fn intersection(&self, other: &Self) -> Option<Self>
[src]

pub fn union(&self, other: &Self) -> Self
[src]

Trait Implementations

impl<T: PartialEq> PartialEq<Rect<T>> for Rect<T>
[src]

impl<T: Eq> Eq for Rect<T>
[src]

impl<T: PartialOrd> PartialOrd<Rect<T>> for Rect<T>
[src]

impl<T: Ord> Ord for Rect<T>
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<T: Clone> Clone for Rect<T>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Default> Default for Rect<T>
[src]

impl<T: Copy> Copy for Rect<T>
[src]

impl<T: AddAssign<RHS>, RHS: Copy> AddAssign<Vector<RHS>> for Rect<T>
[src]

impl<T: Debug> Debug for Rect<T>
[src]

impl<T: Hash> Hash for Rect<T>
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Add<RHS>, RHS: Copy> Add<Vector<RHS>> for Rect<T>
[src]

type Output = Rect<T::Output>

The resulting type after applying the + operator.

impl<T: Mul<RHS>, RHS: Copy> Mul<RHS> for Rect<T>
[src]

type Output = Rect<T::Output>

The resulting type after applying the * operator.

impl<T: MulAssign<RHS>, RHS: Copy> MulAssign<RHS> for Rect<T>
[src]

Auto Trait Implementations

impl<T> Send for Rect<T> where
    T: Send

impl<T> Sync for Rect<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]