[][src]Struct vectrs::Vector

pub struct Vector<T, const N: usize> { /* fields omitted */ }

Represents an N dimensional vector.

Implementations

impl<T: Copy, const N: usize> Vector<T, N> where
    Self: X, 
[src]

pub fn x(&self) -> T[src]

Returns this component of the vector.

pub fn x_ref(&self) -> &T[src]

Returns a reference to this component of the vector.

pub fn x_mut(&mut self) -> &mut T[src]

Returns a mutable reference to this component of the vector.

impl<T: Copy, const N: usize> Vector<T, N> where
    Self: Y, 
[src]

pub fn y(&self) -> T[src]

Returns this component of the vector.

pub fn y_ref(&self) -> &T[src]

Returns a reference to this component of the vector.

pub fn y_mut(&mut self) -> &mut T[src]

Returns a mutable reference to this component of the vector.

impl<T: Copy, const N: usize> Vector<T, N> where
    Self: Z, 
[src]

pub fn z(&self) -> T[src]

Returns this component of the vector.

pub fn z_ref(&self) -> &T[src]

Returns a reference to this component of the vector.

pub fn z_mut(&mut self) -> &mut T[src]

Returns a mutable reference to this component of the vector.

impl<T: Copy, const N: usize> Vector<T, N> where
    Self: W, 
[src]

pub fn w(&self) -> T[src]

Returns this component of the vector.

pub fn w_ref(&self) -> &T[src]

Returns a reference to this component of the vector.

pub fn w_mut(&mut self) -> &mut T[src]

Returns a mutable reference to this component of the vector.

Trait Implementations

impl<T: Clone, const N: usize> Clone for Vector<T, N>[src]

impl<T: Copy, const N: usize> Copy for Vector<T, N>[src]

impl<T: Debug, const N: usize> Debug for Vector<T, N>[src]

impl<T: Default + Copy, const N: usize> Default for Vector<T, N>[src]

impl<T: Eq, const N: usize> Eq for Vector<T, N>[src]

impl<T, const N: usize> From<[T; N]> for Vector<T, N>[src]

impl<T> From<(T, T, T, T)> for Vector<T, 4>[src]

impl<T> From<(T, T, T)> for Vector<T, 3>[src]

impl<T> From<(T, T)> for Vector<T, 2>[src]

impl<T: Hash, const N: usize> Hash for Vector<T, N>[src]

impl<T: Ord, const N: usize> Ord for Vector<T, N>[src]

impl<T: PartialEq, const N: usize> PartialEq<Vector<T, N>> for Vector<T, N>[src]

impl<T: PartialOrd, const N: usize> PartialOrd<Vector<T, N>> for Vector<T, N>[src]

impl<T, const N: usize> StructuralEq for Vector<T, N>[src]

impl<T, const N: usize> StructuralPartialEq for Vector<T, N>[src]

Auto Trait Implementations

impl<T, const N: usize> RefUnwindSafe for Vector<T, N> where
    T: RefUnwindSafe
[src]

impl<T, const N: usize> Send for Vector<T, N> where
    T: Send
[src]

impl<T, const N: usize> Sync for Vector<T, N> where
    T: Sync
[src]

impl<T, const N: usize> Unpin for Vector<T, N> where
    T: Unpin
[src]

impl<T, const N: usize> UnwindSafe for Vector<T, N> 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, 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.