[][src]Struct orbtk::utils::Size

pub struct Size { /* fields omitted */ }

A Size specified by width and height.

Examples

let size = Size::new(10., 10.);
let other_size = Size::new(5., 7.);
let result = size - other_size;

assert_eq!(result.width(), 5.);
assert_eq!(result.height(), 3.);

Implementations

impl Size[src]

pub fn width(&self) -> f64[src]

Gets the width of the size.

pub fn set_width(&mut self, width: f64)[src]

Sets the width of the size.

pub fn height(&self) -> f64[src]

Gets the height of the size.

pub fn set_height(&mut self, height: f64)[src]

Sets the height of the size.

impl Size[src]

pub fn new(width: f64, height: f64) -> Size[src]

Trait Implementations

impl Add<Size> for Size[src]

type Output = Size

The resulting type after applying the + operator.

impl Clone for Size[src]

impl Copy for Size[src]

impl Debug for Size[src]

impl Default for Size[src]

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

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

impl From<f64> for Size[src]

impl From<i32> for Size[src]

impl IntoPropertySource<Size> for (f64, f64)[src]

impl IntoPropertySource<Size> for (String, Entity)[src]

impl<'_> IntoPropertySource<Size> for (&'_ str, Entity)[src]

impl IntoPropertySource<Size> for i32[src]

impl IntoPropertySource<Size> for f64[src]

impl IntoPropertySource<Size> for Size[src]

impl IntoPropertySource<Size> for Entity[src]

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

impl PartialEq<Size> for Size[src]

impl Sub<Size> for Size[src]

type Output = Size

The resulting type after applying the - operator.

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<E> Component for E where
    E: Any
[src]

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

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

impl<T> SetParameter for T

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<V, T> VZip<V> for T where
    V: MultiLane<T>,