[][src]Module gridly::location

Location type used to index into grids, as well as associated types and traits.

Structs

Column

A column component of a Location. See Component for details.

Location

A location on a grid. A location is the primary indexing type for a Grid, and represents a single cell on that grid. It is comprised of a Row and a Column. Increasing row count downward and increasing columns count rightward.

Ordered

Rules for ordering a location. This struct wraps a LocationLike and supplies an Ord and PartialOrd implementation. The Major type parameter indicates which ordering is used; for instance, Ordering<Row> provides row-major ordering, where Locations are sorted first by row, then by column.

Row

A row component of a Location. See Component for details.

Traits

Component

A component of a Location, which may be either a Row or a Column. It is effectively an index into a given row or column of a grid; for instance, a Row can index a row in a grid.

LocationLike

This trait covers structs that act like a Location, such as tuples. See the Location documentation for more details.

Type Definitions

ColumnOrdered

A generic type for ordering a LocationLike type T by column.

ColumnOrderedLocation

Type alias for a Location ordered by column.

RowOrdered

A generic type alias for ordering a LocationLike type T by row.

RowOrderedLocation

Type alias for a Location ordered by row.