Struct iced_web::Vector[][src]

pub struct Vector<T = f32> {
    pub x: T,
    pub y: T,
}

A 2D vector.

Fields

x: T

The X component of the Vector

y: T

The Y component of the Vector

Implementations

impl<T> Vector<T>[src]

pub const fn new(x: T, y: T) -> Vector<T>[src]

Creates a new Vector with the given components.

Trait Implementations

impl<T> Add<Vector<T>> for Vector<T> where
    T: Add<T, Output = T>, 
[src]

type Output = Vector<T>

The resulting type after applying the + operator.

impl<T> Add<Vector<T>> for Rectangle<T> where
    T: Add<T, Output = T>, 
[src]

type Output = Rectangle<T>

The resulting type after applying the + operator.

impl Add<Vector<f32>> for Point[src]

type Output = Point

The resulting type after applying the + operator.

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

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

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

impl<T> Default for Vector<T> where
    T: Default
[src]

impl<T> From<[T; 2]> for Vector<T>[src]

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

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

impl<T> Mul<T> for Vector<T> where
    T: Mul<T, Output = T> + Copy
[src]

type Output = Vector<T>

The resulting type after applying the * operator.

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

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

impl<T> Sub<Vector<T>> for Vector<T> where
    T: Sub<T, Output = T>, 
[src]

type Output = Vector<T>

The resulting type after applying the - operator.

impl Sub<Vector<f32>> for Point[src]

type Output = Point

The resulting type after applying the - operator.

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for Vector<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> From<T> for T[src]

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

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.