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 this coordinate.

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>