Trait Array3

Source
pub trait Array3<T> {
    // Required methods
    fn map<U, F>(self, f: F) -> [U; 3]
       where F: Fn(T) -> U;
    fn x(self) -> T;
    fn y(self) -> T;
    fn z(self) -> T;
}
Expand description

An array with 3 components.

Required Methods§

Source

fn map<U, F>(self, f: F) -> [U; 3]
where F: Fn(T) -> U,

Converts array into another type, by executing a function for each component.

Source

fn x(self) -> T

Returns the x component.

Source

fn y(self) -> T

Returns the y component.

Source

fn z(self) -> T

Returns the z component.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Copy> Array3<T> for [T; 3]

Source§

fn map<U, F>(self, f: F) -> [U; 3]
where F: Fn(T) -> U,

Source§

fn x(self) -> T

Source§

fn y(self) -> T

Source§

fn z(self) -> T

Implementors§