[−][src]Trait gridly::prelude::BaseGrid
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
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.