Crate toodee

source ·
Expand description

A lightweight two-dimensional wrapper around a Vec.

Structs

  • An iterator over a single column.
  • A mutable iterator over a single column.
  • Drains a column.
  • An iterator that behaves like core::iter::adapters::Flatten but has the added advantage of implementing ExactSizeIterator (we know how many cells there are per row in a TooDee array).
  • An Iterator over each row of a TooDee[View], where each row is represented as a slice.
  • A mutable Iterator over each row of a TooDee[ViewMut], where each row is represented as a slice.
  • Represents a two-dimensional array.
  • Provides a read-only view (or subset) of a TooDee array.
  • Provides a mutable view (or subset), of a TooDee array.

Traits

  • Provides basic copying operations for TooDee structures.
  • Provides sorting capabilities to two-dimensional arrays. Sorting of the rows and columns is performed in-place, and care is taken to minimise row/col swaps. This is achieved by sorting the row/col and original index pair, then repositioning the rows/columns once the new ordering has been determined.
  • An Iterator that knows how many columns it emits per row.
  • Defines operations common to both TooDee and TooDeeView. Default implementations are provided where possible/practical.
  • Defines operations common to both TooDee and TooDeeViewMut. Default implementations are provided where possible/practical.
  • Provides implementations for translate (also known as scroll) operations, and other internal data movement operations such as flipping.

Type Aliases

  • An iterator over each “cell” in a 2D array
  • A mutable iterator over each “cell” in a 2D array
  • A (col, row) coordinate in 2D space.
  • DrainRow type alias for future-proofing.
  • IntoIter type alias for future-proofing.