Trait Apply

Source
pub trait Apply<T> {
    type Cont<_T>;

    // Required method
    fn apply<U, F>(&self, f: F) -> Self::Cont<U>
       where F: Fn(T) -> U;
}
Expand description

The Apply establishes an interface for owned containers that are capable of applying some function onto their elements.

Required Associated Types§

Source

type Cont<_T>

Required Methods§

Source

fn apply<U, F>(&self, f: F) -> Self::Cont<U>
where F: Fn(T) -> U,

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<A, S, D> Apply<A> for &ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Cont<V> = ArrayBase<OwnedRepr<V>, D>

Source§

fn apply<B, F>(&self, f: F) -> ArrayBase<OwnedRepr<B>, D>
where F: Fn(A) -> B,

Source§

impl<A, S, D> Apply<A> for &mut ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Cont<V> = ArrayBase<OwnedRepr<V>, D>

Source§

fn apply<B, F>(&self, f: F) -> ArrayBase<OwnedRepr<B>, D>
where F: Fn(A) -> B,

Source§

impl<A, S, D> Apply<A> for ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Cont<V> = ArrayBase<OwnedRepr<V>, D>

Source§

fn apply<V, F>(&self, f: F) -> <ArrayBase<S, D> as Apply<A>>::Cont<V>
where F: Fn(A) -> V,

Implementors§

Source§

impl<A, S, D> Apply<A> for TensorBase<S, D>
where A: ScalarOperand, D: Dimension, S: Data<Elem = A>,