pub trait GridMut<T: Clone>: Grid<T> {
// Required methods
fn set_optional(&mut self, x: usize, y: usize, value: T) -> bool;
fn fill(&mut self, value: T);
// Provided methods
fn set(&mut self, x: usize, y: usize, value: T) { ... }
fn deref_assign<O: Grid<T>>(&mut self, other: &O) { ... }
fn set_col(
&mut self,
x: usize,
col: &[T],
) -> Result<(), SetValueSeriesError> { ... }
fn set_row(
&mut self,
y: usize,
row: &[T],
) -> Result<(), SetValueSeriesError> { ... }
}Expand description
A two-dimensional mutable grid of T
Required Methods§
Provided Methods§
Sourcefn deref_assign<O: Grid<T>>(&mut self, other: &O)
fn deref_assign<O: Grid<T>>(&mut self, other: &O)
Fills the grid with the values from the provided grid.
The grids have to match in size exactly.
For 1D slices the equivalent would be *slice = other_slice.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.