Trait ha_ndarray::Access

source ·
pub trait Access<T: CType>: Send + Sync {
    // Required methods
    fn read(&self) -> Result<BufferConverter<'_, T>, Error>;
    fn read_value(&self, offset: usize) -> Result<T, Error>;
    fn size(&self) -> usize;
}
Expand description

A type which allows accessing array data

Required Methods§

source

fn read(&self) -> Result<BufferConverter<'_, T>, Error>

Read the data of this accessor as a BufferConverter.

source

fn read_value(&self, offset: usize) -> Result<T, Error>

Access a single value.

source

fn size(&self) -> usize

Return the data size.

Implementors§

source§

impl<T, B> Access<T> for AccessBuf<B>
where T: CType, B: BufferInstance<T>,

source§

impl<T: CType> Access<T> for Accessor<T>