Skip to main content

NDArrayRead

Trait NDArrayRead 

Source
pub trait NDArrayRead:
    NDArray
    + Debug
    + Sized {
    // Required methods
    fn buffer(&self) -> Result<BufferConverter<'_, Self::DType>, Error>;
    fn into_read(
        self,
    ) -> Result<Array<Self::DType, AccessBuf<<Self::Platform as Convert<Self::DType>>::Buffer>, Self::Platform>, Error>
       where Self::Platform: Convert<Self::DType>;
    fn read_value(&self, coord: &[usize]) -> Result<Self::DType, Error>;
}
Expand description

Access methods for an NDArray

Required Methods§

Source

fn buffer(&self) -> Result<BufferConverter<'_, Self::DType>, Error>

Read the value of this NDArray into a BufferConverter.

Source

fn into_read( self, ) -> Result<Array<Self::DType, AccessBuf<<Self::Platform as Convert<Self::DType>>::Buffer>, Self::Platform>, Error>
where Self::Platform: Convert<Self::DType>,

Buffer this NDArray into a new, owned array, allocating only if needed.

Source

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

Read the value at a specific coord in this NDArray.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§