[][src]Struct doryen_extra::Size

pub struct Size {
    pub width: i32,
    pub height: i32,
}

A struct representing a Size determined by its width and height values.

Fields

width: i32

The width value the Size is currently representing.

height: i32

The height value the Size is currently representing.

Implementations

impl Size[src]

pub const ZERO: Self[src]

A constant representing a Size where both width and height are 0.

pub const fn new(width: i32, height: i32) -> Self[src]

Returns a Size with the given width and height values.

impl Size[src]

pub fn area(self) -> i32[src]

Returns the area represented by this size

Trait Implementations

impl Add<(i32, i32)> for Size[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Size> for Size[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Size> for Position[src]

type Output = Rectangle

The resulting type after applying the + operator.

impl Add<i32> for Size[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<(i32, i32)> for Size[src]

impl AddAssign<i32> for Size[src]

impl Clone for Size[src]

impl Copy for Size[src]

impl Debug for Size[src]

impl Default for Size[src]

impl Display for Size[src]

impl Div<i32> for Size[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<i32> for Size[src]

impl Eq for Size[src]

impl From<(i32, i32)> for Size[src]

impl From<Size> for (i32, i32)[src]

impl Mul<i32> for Size[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<i32> for Size[src]

impl Neg for Size[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<Size> for Size[src]

impl Rem<i32> for Size[src]

type Output = Self

The resulting type after applying the % operator.

impl RemAssign<i32> for Size[src]

impl StructuralEq for Size[src]

impl StructuralPartialEq for Size[src]

impl Sub<(i32, i32)> for Size[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<Size> for Size[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<i32> for Size[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<(i32, i32)> for Size[src]

impl SubAssign<i32> for Size[src]

Auto Trait Implementations

impl RefUnwindSafe for Size

impl Send for Size

impl Sync for Size

impl Unpin for Size

impl UnwindSafe for Size

Blanket Implementations

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

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

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

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Erased for T

impl<T> From<T> for T[src]

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

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,