[][src]Struct coord::vec1::Vec1

pub struct Vec1<T: VecItem> {
    pub x: T,
}

Fields

x: T

Methods

impl<T: VecItem> Vec1<T>[src]

pub fn new(x: T) -> Self[src]

Creates a new Vec1 from a single component

pub fn elements(&self) -> [T; 1][src]

Returns the elements of the vector as an array

pub fn map<U: VecItem, F: Fn(T) -> U>(&self, f: F) -> Vec1<U>[src]

Apply an operation to all elements of this vector, returning the result

pub fn convert_to<U: VecItem + From<T>>(&self) -> Vec1<U>[src]

Trait Implementations

impl<T> VecNum for Vec1<T> where
    T: VecItem + Num
[src]

impl<T> VecInt for Vec1<T> where
    T: VecItem + Integer
[src]

impl<T> VecSigned for Vec1<T> where
    T: VecItem + Signed
[src]

impl<T> VecFloat for Vec1<T> where
    T: VecItem + Float
[src]

impl<T: VecItem> Vector for Vec1<T>[src]

type Item = T

impl<T: VecItem> From<T> for Vec1<T>[src]

impl<T: VecItem> From<[T; 1]> for Vec1<T>[src]

impl<T: VecItem + Display> Display for Vec1<T>[src]

impl<T: VecItem + Debug> Debug for Vec1<T>[src]

impl<T> Div<Vec1<T>> for Vec1<T> where
    T: VecItem + Div,
    T::Output: VecItem + Div
[src]

type Output = Vec1<T::Output>

The resulting type after applying the / operator.

impl<T> Div<T> for Vec1<T> where
    T: VecItem + Div,
    T::Output: VecItem + Div
[src]

type Output = Vec1<T::Output>

The resulting type after applying the / operator.

impl<T> Sub<Vec1<T>> for Vec1<T> where
    T: VecItem + Sub,
    T::Output: VecItem + Sub
[src]

type Output = Vec1<T::Output>

The resulting type after applying the - operator.

impl<T> Sub<T> for Vec1<T> where
    T: VecItem + Sub,
    T::Output: VecItem + Sub
[src]

type Output = Vec1<T::Output>

The resulting type after applying the - operator.

impl<T: PartialEq + VecItem> PartialEq<Vec1<T>> for Vec1<T>[src]

impl<T: Eq + VecItem> Eq for Vec1<T>[src]

impl<T> Add<Vec1<T>> for Vec1<T> where
    T: VecItem + Add,
    T::Output: VecItem + Add
[src]

type Output = Vec1<T::Output>

The resulting type after applying the + operator.

impl<T> Add<T> for Vec1<T> where
    T: VecItem + Add,
    T::Output: VecItem + Add
[src]

type Output = Vec1<T::Output>

The resulting type after applying the + operator.

impl<T> Mul<Vec1<T>> for Vec1<T> where
    T: VecItem + Mul,
    T::Output: VecItem + Mul
[src]

type Output = Vec1<T::Output>

The resulting type after applying the * operator.

impl<T> Mul<T> for Vec1<T> where
    T: VecItem + Mul,
    T::Output: VecItem + Mul
[src]

type Output = Vec1<T::Output>

The resulting type after applying the * operator.

impl<T> AddAssign<Vec1<T>> for Vec1<T> where
    T: VecItem + Add<Output = T>, 
[src]

impl<T> AddAssign<T> for Vec1<T> where
    T: VecItem + Add<Output = T>, 
[src]

impl<T> SubAssign<Vec1<T>> for Vec1<T> where
    T: VecItem + Sub<Output = T>, 
[src]

impl<T> SubAssign<T> for Vec1<T> where
    T: VecItem + Sub<Output = T>, 
[src]

impl<T> MulAssign<Vec1<T>> for Vec1<T> where
    T: VecItem + Mul<Output = T>, 
[src]

impl<T> MulAssign<T> for Vec1<T> where
    T: VecItem + Mul<Output = T>, 
[src]

impl<T> DivAssign<Vec1<T>> for Vec1<T> where
    T: VecItem + Div<Output = T>, 
[src]

impl<T> DivAssign<T> for Vec1<T> where
    T: VecItem + Div<Output = T>, 
[src]

impl<T: Hash + VecItem> Hash for Vec1<T>[src]

impl<T: Copy + VecItem> Copy for Vec1<T>[src]

impl<T: Clone + VecItem> Clone for Vec1<T>[src]

impl<T: Default + VecItem> Default for Vec1<T>[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

impl<V> VecDot for V where
    V: Copy + VecNum + Mul<V, Output = V>,
    <V as Vector>::Item: VecItem,
    <V as Vector>::Item: Num
[src]

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

impl<T> From<!> for T[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> Into<U> for T where
    U: From<T>, 
[src]

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> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]