Trait MatrixRef

Source
pub trait MatrixRef<C> {
    // Required method
    fn get<T: Into<MatrixCoordinates>>(
        &self,
        coordinates: T,
    ) -> Result<&C, CoordinatesOutOfBoundsError>;
}
Expand description

Trait to handle matrix data by reference.

Required Methods§

Source

fn get<T: Into<MatrixCoordinates>>( &self, coordinates: T, ) -> Result<&C, CoordinatesOutOfBoundsError>

Get a matrix value at these coordinates. Coordinates should be row and column indices with respect to the source matrix.

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§

Source§

impl<C> MatrixRef<C> for Matrix<C>

Source§

impl<C> MatrixRef<C> for MatrixSlice<'_, C>