[][src]Trait gridly::prelude::BaseGrid

pub trait BaseGrid: GridBounds {
    type Item;
    unsafe fn get_unchecked(&self, location: &Location) -> &Self::Item;
}

Base Reader trait for grids.

This trait provides the grid's cell type, Item, and a single, unsafe reader function, get_unchecked, which provides a reference to a cell at a location.

The Grid trait, which is automatically implemented for all BaseGrid, provides a safe and comprehensive interface to a BaseGrid, which includes bounds checking based on GridBounds and many different view and iterator methods.

Associated Types

type Item

Loading content...

Required methods

unsafe fn get_unchecked(&self, location: &Location) -> &Self::Item

Get a reference to a cell, without doing bounds checking. Implementors of this method are allowed to assume that bounds checking has already been performed on the location, which means that implementors are allowed to do their own unsafe get operations on the underlying storage, where relevant.

Loading content...

Implementations on Foreign Types

impl<'_, G: BaseGrid> BaseGrid for &'_ G[src]

type Item = G::Item

impl<'_, G: BaseGrid> BaseGrid for &'_ mut G[src]

type Item = G::Item

Loading content...

Implementors

Loading content...