pub trait GridView<Pos, const DIMS: usize>: Copy + Sizedwhere
Pos: GridPos<DIMS>,{
type Item;
type Cursors: Iterator<Item = GridCursor<Pos, DIMS>>;
Show 18 methods
// Required methods
fn start(self) -> Pos;
fn end(self) -> Pos;
fn size(self) -> Pos;
fn get_trusted(self, native: Pos, idx: usize) -> Self::Item;
fn cursors(self) -> Self::Cursors;
// Provided methods
fn len(self) -> usize { ... }
fn is_empty(self) -> bool { ... }
fn keys(self) -> GridKeysIter<Pos, DIMS> ⓘ { ... }
fn first_key(self) -> Pos { ... }
fn last_key(self) -> Pos { ... }
fn get(self, pos: Pos) -> Option<Self::Item> { ... }
fn get_native(self, native: Pos) -> Option<Self::Item> { ... }
fn offset(self, pos: Pos) -> NumResult<GridOffset<Pos, DIMS>> { ... }
fn cursor(self, pos: Pos) -> Option<GridCursor<Pos, DIMS>> { ... }
fn map<Storage, MapFn, Output>(
self,
map_fn: MapFn
) -> GridBuf<Storage, Pos, DIMS>
where MapFn: FnMut(GridCursor<Pos, DIMS>) -> Output,
Storage: Clone + GridStorage + FromIterator<Output> { ... }
fn extend_map<Storage, MapFn, Output>(
self,
amts: [(Pos::Coord, Pos::Coord); DIMS],
map_fn: MapFn
) -> NumResult<GridBuf<Storage, Pos, DIMS>>
where MapFn: FnMut(GridCursor<Pos, DIMS>) -> Output,
Storage: Clone + GridStorage + FromIterator<Output>,
Self::Item: Default { ... }
fn try_map<Storage, MapFn, Output, Error>(
self,
map_fn: MapFn
) -> Result<GridBuf<Storage, Pos, DIMS>, Error>
where MapFn: FnMut(GridCursor<Pos, DIMS>) -> Result<Output, Error>,
Storage: Clone + GridStorage + FromIterator<Output> { ... }
fn transform<Storage>(
self,
start: Pos,
axes: [impl Into<Pos>; DIMS]
) -> NumResult<GridBuf<Storage, Pos, DIMS>>
where Storage: Clone + GridStorage + FromIterator<Self::Item>,
Pos::Coord: IntSigned { ... }
}