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.

Returns all elements in block as a slice in memory order.

Returns all elements in block as a mutable slice in memory order.

Trait Implementations

Formats the value using the given formatter. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.