Struct iced::Size[][src]

pub struct Size<T = f32> {
    pub width: T,
    pub height: T,
}

An amount of space in 2 dimensions.

Fields

width: T

The width.

height: T

The height.

Implementations

impl<T> Size<T>[src]

pub const fn new(width: T, height: T) -> Size<T>[src]

Creates a new Size with the given width and height.

impl Size<f32>[src]

pub const ZERO: Size<f32>[src]

A Size with zero width and height.

pub const UNIT: Size<f32>[src]

A Size with a width and height of 1 unit.

pub const INFINITY: Size<f32>[src]

A Size with infinite width and height.

pub fn pad(&self, padding: f32) -> Size<f32>[src]

Increments the Size to account for the given padding.

Trait Implementations

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

impl<T> Copy for Size<T> where
    T: Copy
[src]

impl<T> Debug for Size<T> where
    T: Debug
[src]

impl From<[f32; 2]> for Size<f32>[src]

impl From<[u16; 2]> for Size<f32>[src]

impl From<Size<f32>> for Vector<f32>[src]

impl From<Vector<f32>> for Size<f32>[src]

impl<T> PartialEq<Size<T>> for Size<T> where
    T: PartialEq<T>, 
[src]

impl<T> StructuralPartialEq for Size<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Size<T> where
    T: RefUnwindSafe

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

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

impl<T> Unpin for Size<T> where
    T: Unpin

impl<T> UnwindSafe for Size<T> where
    T: UnwindSafe

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<T> for T

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

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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<T> Upcast<T> for T

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