Skip to main content

VectorOps

Trait VectorOps 

Source
pub trait VectorOps<O> {
    type Elem;
    type Output;

    // Required methods
    fn map<F: FnMut(Self::Elem) -> O>(self, f: F) -> Self::Output;
    fn zip<F: FnMut(Self::Elem, Self::Elem) -> O>(
        self,
        rhs: Self,
        f: F,
    ) -> Self::Output;
}
Expand description

Additional element-wise operations on euclid types.

Required Associated Types§

Source

type Elem

Input vector element type.

Source

type Output

Output vector type.

Required Methods§

Source

fn map<F: FnMut(Self::Elem) -> O>(self, f: F) -> Self::Output

Apply the function to each element.

Source

fn zip<F: FnMut(Self::Elem, Self::Elem) -> O>( self, rhs: Self, f: F, ) -> Self::Output

Apply the function to each element of the two inputs, pairwise.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, O, U> VectorOps<O> for Size2D<T, U>

Source§

type Elem = T

Source§

type Output = Size2D<O, U>

Source§

fn map<F: FnMut(Self::Elem) -> O>(self, f: F) -> Self::Output

Source§

fn zip<F: FnMut(Self::Elem, Self::Elem) -> O>( self, rhs: Self, f: F, ) -> Self::Output

Source§

impl<T, O, U> VectorOps<O> for Size3D<T, U>

Source§

type Elem = T

Source§

type Output = Size3D<O, U>

Source§

fn map<F: FnMut(Self::Elem) -> O>(self, f: F) -> Self::Output

Source§

fn zip<F: FnMut(Self::Elem, Self::Elem) -> O>( self, rhs: Self, f: F, ) -> Self::Output

Source§

impl<T, O: Copy, U> VectorOps<O> for Box3D<T, U>

Source§

type Elem = T

Source§

type Output = Box3D<O, U>

Source§

fn map<F: FnMut(Self::Elem) -> O>(self, f: F) -> Self::Output

Source§

fn zip<F: FnMut(Self::Elem, Self::Elem) -> O>( self, rhs: Self, f: F, ) -> Self::Output

Implementors§