Skip to main content

Crate fey_grid

Crate fey_grid 

Source
Expand description

2D grid data structure and related traits.

This library provides two core traits, Grid and GridMut, which represent immutable and mutable grids respectively. Rather than just supplying a concrete 2D array type, this approach allows all grid-based algorithms to be written generically, which lets the user choose the actual implementation and storage method for their grids.

Structs§

Clamp
Clamps the inner coordinate (or coord component) in grid space.
ClampX
Clamps the x value of the inner coordinate in grid space.
ClampY
Clamps the y value of the inner coordinate in grid space.
Col
A single column of a grid.
ColIter
Iterator over the values in a column.
ColsIter
Iterator over the columns of a grid.
GridBuf
A grid implementation for different storage types.
GridIter
Iterator over all values in a grid, and their positions.
Row
A single row of a grid.
RowIter
Iterator over the values in a row.
RowsIter
Iterator over the rows of a grid.
View
Sub-section of a larger grid.
Wrap
Wraps the inner coordinate (or coord component) in grid space.
WrapX
Wraps the x value of the inner coordinate in grid space.
WrapY
Wraps the y value of the inner coordinate in grid space.

Traits§

Coord
CoordComponent
An x or y component of a grid coordinate.
Grid
A type representing an immutable 2D array.
GridMut
A type representing a mutable 2D array.

Type Aliases§

ArrGrid
A grid implementation using an array for storage.
MutSliceGrid
A grid implementation using a mutable slice for storage.
SliceGrid
A grid implementation using a slice for storage.
VecGrid
A grid implementation using a Vec for storage.