[][src]Trait gridly::prelude::BaseGridBounds

pub trait BaseGridBounds {
    fn dimensions(&self) -> Vector;

    fn root(&self) -> Location { ... }
}

High-level trait implementing grid sizes and boundary checking.

This trait doesn't provide any direct grid functionality, but instead provides the bounds checking which is generic to all of the different kinds of grid.

Required methods

fn dimensions(&self) -> Vector

Get the dimensions of the grid, as a Vector.

Loading content...

Provided methods

fn root(&self) -> Location

Return the root location (ie, the top left) of the grid. For most grids, this is (0, 0), but some grids may include negatively indexed locations, or even offsets. All valid locations have location >= root.

Loading content...

Implementations on Foreign Types

impl<'_, G: BaseGridBounds + ?Sized> BaseGridBounds for &'_ G[src]

impl<'_, G: BaseGridBounds + ?Sized> BaseGridBounds for &'_ mut G[src]

Loading content...

Implementors

Loading content...