Struct block_grid::BlockMut [−][src]
pub struct BlockMut<'a, T, B: BlockDim> { /* fields omitted */ }
Expand description
A mutable view of a 2D block contiguous in memory.
Can be obtained via BlockIterMut
, which is created by calling BlockGrid::block_iter_mut
.
Implementations
Returns the coordinates of the entire block.
Block coordinates mean that the (i, j)
refers to the i
-th row of blocks and the
j
-th block in that row. If you need the coordinates of the first (top-left) element,
use starts_at
instead.
Returns of the coordinates of the first (top-left) element in the block.
Returns true
if the given coordinates are valid.
Returns a reference to the element at the given coordinates, or None
if they are
out-of-bounds.
Returns a mutable reference to the element at the given coordinates, or None
if they
are out-of-bounds.
Returns a reference to the element at the given coordinates, without bounds checking.
Safety
Calling this method with out-of-bounds coordinates is undefined-behaviour.
Returns a mutable reference to the element at the given coordinates, without bounds checking.
Safety
Calling this method with out-of-bounds coordinates is undefined-behaviour.