Trait ApplyMut

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

    // Required method
    fn apply_mut<'a, F>(&'a mut self, f: F)
       where T: 'a,
             F: FnMut(T) -> T;
}
Expand description

The ApplyMut trait mutates the each element of the container, in-place, using the given function.

Required Associated Types§

Source

type Cont<_T>

Required Methods§

Source

fn apply_mut<'a, F>(&'a mut self, f: F)
where T: 'a, F: FnMut(T) -> 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<A, S, D> ApplyMut<A> for &mut ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: DataMut<Elem = A>,

Source§

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

Source§

fn apply_mut<'b, F>(&'b mut self, f: F)
where A: 'b, F: FnMut(A) -> A,

Source§

impl<A, S, D> ApplyMut<A> for ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: DataMut<Elem = A>,

Source§

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

Source§

fn apply_mut<'a, F>(&'a mut self, f: F)
where A: 'a, F: FnMut(A) -> A,

Implementors§