Trait ArrayMap

Source
pub trait ArrayMap<X, Y, T> {
    // Required method
    fn map<F: Fn(&X) -> Y>(&self, f: F) -> T;
}
Expand description

map a function over an array

Examples:

use arraymap::ArrayMap;

let x = [1, 2, 3];
assert_eq!([2, 3, 4], x.map(|v| v + 1));

Required Methods§

Source

fn map<F: Fn(&X) -> Y>(&self, f: F) -> T

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<U, V> ArrayMap<U, V, [V; 0]> for [U; 0]

Source§

fn map<F: Fn(&U) -> V>(&self, _: F) -> [V; 0]

Source§

impl<U, V> ArrayMap<U, V, [V; 1]> for [U; 1]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 1]

Source§

impl<U, V> ArrayMap<U, V, [V; 2]> for [U; 2]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 2]

Source§

impl<U, V> ArrayMap<U, V, [V; 3]> for [U; 3]

Source§

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

Source§

impl<U, V> ArrayMap<U, V, [V; 4]> for [U; 4]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 4]

Source§

impl<U, V> ArrayMap<U, V, [V; 5]> for [U; 5]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 5]

Source§

impl<U, V> ArrayMap<U, V, [V; 6]> for [U; 6]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 6]

Source§

impl<U, V> ArrayMap<U, V, [V; 7]> for [U; 7]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 7]

Source§

impl<U, V> ArrayMap<U, V, [V; 8]> for [U; 8]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 8]

Source§

impl<U, V> ArrayMap<U, V, [V; 9]> for [U; 9]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 9]

Source§

impl<U, V> ArrayMap<U, V, [V; 10]> for [U; 10]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 10]

Source§

impl<U, V> ArrayMap<U, V, [V; 11]> for [U; 11]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 11]

Source§

impl<U, V> ArrayMap<U, V, [V; 12]> for [U; 12]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 12]

Source§

impl<U, V> ArrayMap<U, V, [V; 13]> for [U; 13]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 13]

Source§

impl<U, V> ArrayMap<U, V, [V; 14]> for [U; 14]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 14]

Source§

impl<U, V> ArrayMap<U, V, [V; 15]> for [U; 15]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 15]

Source§

impl<U, V> ArrayMap<U, V, [V; 16]> for [U; 16]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 16]

Source§

impl<U, V> ArrayMap<U, V, [V; 17]> for [U; 17]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 17]

Source§

impl<U, V> ArrayMap<U, V, [V; 18]> for [U; 18]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 18]

Source§

impl<U, V> ArrayMap<U, V, [V; 19]> for [U; 19]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 19]

Source§

impl<U, V> ArrayMap<U, V, [V; 20]> for [U; 20]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 20]

Source§

impl<U, V> ArrayMap<U, V, [V; 21]> for [U; 21]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 21]

Source§

impl<U, V> ArrayMap<U, V, [V; 22]> for [U; 22]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 22]

Source§

impl<U, V> ArrayMap<U, V, [V; 23]> for [U; 23]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 23]

Source§

impl<U, V> ArrayMap<U, V, [V; 24]> for [U; 24]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 24]

Source§

impl<U, V> ArrayMap<U, V, [V; 25]> for [U; 25]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 25]

Source§

impl<U, V> ArrayMap<U, V, [V; 26]> for [U; 26]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 26]

Source§

impl<U, V> ArrayMap<U, V, [V; 27]> for [U; 27]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 27]

Source§

impl<U, V> ArrayMap<U, V, [V; 28]> for [U; 28]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 28]

Source§

impl<U, V> ArrayMap<U, V, [V; 29]> for [U; 29]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 29]

Source§

impl<U, V> ArrayMap<U, V, [V; 30]> for [U; 30]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 30]

Source§

impl<U, V> ArrayMap<U, V, [V; 31]> for [U; 31]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 31]

Source§

impl<U, V> ArrayMap<U, V, [V; 32]> for [U; 32]

Source§

fn map<F: Fn(&U) -> V>(&self, f: F) -> [V; 32]

Implementors§