Trait NDArrayWrite

Source
pub trait NDArrayWrite:
    NDArray
    + Debug
    + Sized {
    // Required methods
    fn write<O: NDArrayRead<DType = Self::DType>>(
        &mut self,
        other: &O,
    ) -> Result<(), Error>;
    fn write_value(&mut self, value: Self::DType) -> Result<(), Error>;
    fn write_value_at(
        &mut self,
        coord: &[usize],
        value: Self::DType,
    ) -> Result<(), Error>;
}
Expand description

Access methods for a mutable NDArray

Required Methods§

Source

fn write<O: NDArrayRead<DType = Self::DType>>( &mut self, other: &O, ) -> Result<(), Error>

Overwrite this NDArray with the value of the other array.

Source

fn write_value(&mut self, value: Self::DType) -> Result<(), Error>

Overwrite this NDArray with a constant scalar value.

Source

fn write_value_at( &mut self, coord: &[usize], value: Self::DType, ) -> Result<(), Error>

Write the given value at the given coord of this NDArray.

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.

Implementors§