Struct shades::V2[][src]

pub struct V2<T>(_);

Scalar vectors.

Scalar vectors come into three flavors, based on the dimension used:

  • Two dimensions (2D): V2<T>.
  • Three dimensions (3D): V3<T>.
  • Four dimensions (4D): V4<T>.

Each type implements the From trait for sized array. For instance, if you want to make a V3<f32> from constants / literals, you can simply use the implementor From<[f32; 3]> for V3<f32>.

A builder macro version exists for each flavor:

Those three macros can also be used with literals.

Trait Implementations

impl<'a> Add<V2<f32>> for Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<f32>> for Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<f32>> for &'a Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<f32>> for &'a Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<i32>> for Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<i32>> for Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<i32>> for &'a Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<i32>> for &'a Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<u32>> for Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<u32>> for Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<u32>> for &'a Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the + operator.

impl<'a> Add<V2<u32>> for &'a Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the + operator.

impl<'a> BitAnd<V2<bool>> for Expr<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the & operator.

impl<'a> BitAnd<V2<bool>> for Var<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the & operator.

impl<'a> BitAnd<V2<bool>> for &'a Expr<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the & operator.

impl<'a> BitAnd<V2<bool>> for &'a Var<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the & operator.

impl<'a> BitOr<V2<bool>> for Expr<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the | operator.

impl<'a> BitOr<V2<bool>> for Var<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the | operator.

impl<'a> BitOr<V2<bool>> for &'a Expr<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the | operator.

impl<'a> BitOr<V2<bool>> for &'a Var<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the | operator.

impl<'a> BitXor<V2<bool>> for Expr<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the ^ operator.

impl<'a> BitXor<V2<bool>> for Var<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the ^ operator.

impl<'a> BitXor<V2<bool>> for &'a Expr<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the ^ operator.

impl<'a> BitXor<V2<bool>> for &'a Var<V2<bool>>[src]

type Output = Expr<V2<bool>>

The resulting type after applying the ^ operator.

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

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

impl<'a> Div<V2<f32>> for Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<f32>> for Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<f32>> for &'a Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<f32>> for &'a Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<i32>> for Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<i32>> for Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<i32>> for &'a Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<i32>> for &'a Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<u32>> for Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<u32>> for Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<u32>> for &'a Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the / operator.

impl<'a> Div<V2<u32>> for &'a Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the / operator.

impl<'a> From<&'a V2<bool>> for Expr<V2<bool>>[src]

impl<'a> From<&'a V2<f32>> for Expr<V2<f32>>[src]

impl<'a> From<&'a V2<i32>> for Expr<V2<i32>>[src]

impl<'a> From<&'a V2<u32>> for Expr<V2<u32>>[src]

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

impl From<V2<bool>> for Expr<V2<bool>>[src]

impl From<V2<f32>> for Expr<V2<f32>>[src]

impl From<V2<i32>> for Expr<V2<i32>>[src]

impl From<V2<u32>> for Expr<V2<u32>>[src]

impl<'a> Mul<V2<f32>> for Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<f32>> for Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<f32>> for &'a Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<f32>> for &'a Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<f32>> for Expr<M22>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<f32>> for Var<M22>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<f32>> for &'a Expr<M22>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<f32>> for &'a Var<M22>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<i32>> for Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<i32>> for Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<i32>> for &'a Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<i32>> for &'a Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<u32>> for Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<u32>> for Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<u32>> for &'a Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the * operator.

impl<'a> Mul<V2<u32>> for &'a Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the * operator.

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

impl<'a> Rem<V2<f32>> for Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the % operator.

impl<'a> Rem<V2<f32>> for Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the % operator.

impl<'a> Rem<V2<f32>> for &'a Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the % operator.

impl<'a> Rem<V2<f32>> for &'a Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the % operator.

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

impl<'a> Sub<V2<f32>> for Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<f32>> for Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<f32>> for &'a Expr<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<f32>> for &'a Var<V2<f32>>[src]

type Output = Expr<V2<f32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<i32>> for Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<i32>> for Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<i32>> for &'a Expr<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<i32>> for &'a Var<V2<i32>>[src]

type Output = Expr<V2<i32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<u32>> for Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<u32>> for Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<u32>> for &'a Expr<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the - operator.

impl<'a> Sub<V2<u32>> for &'a Var<V2<u32>>[src]

type Output = Expr<V2<u32>>

The resulting type after applying the - operator.

impl ToPrimType for V2<i32>[src]

impl ToPrimType for V2<u32>[src]

impl ToPrimType for V2<f32>[src]

impl ToPrimType for V2<bool>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for V2<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for V2<T> where
    T: Send
[src]

impl<T> Sync for V2<T> where
    T: Sync
[src]

impl<T> Unpin for V2<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for V2<T> where
    T: UnwindSafe
[src]

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> ToType for T where
    T: ToPrimType
[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.