[−][src]Trait toodee::TooDeeOps
Defines operations common to both TooDee
and TooDeeView
. Default implementations are provided
where possible/practical.
Required methods
fn num_cols(&self) -> usize
The number of columns in the area represented by this object.
fn num_rows(&self) -> usize
The number of rows in the area represented by this object.
fn bounds(&self) -> (Coordinate, Coordinate)
Returns the bounds of the object's area within the original TooDee
area (views
are not nested for now).
fn view(&self, start: Coordinate, end: Coordinate) -> TooDeeView<T>
Returns a view (or subset) of the current area based on the coordinates provided.
fn rows(&self) -> Rows<T>
Returns an iterator of slices, where each slice represents the entire row of the object's area.
fn col(&self, col: usize) -> Col<T>
Returns an iterator over a single column
Provided methods
fn size(&self) -> (usize, usize)
Returns the size/dimensions of the current object.
fn is_empty(&self) -> bool
Returns true
if the array contains no elements.
fn cells(&self) -> Cells<T>
Returns an iterator that traverses all cells within the area.