Struct surface_grid::sphere::RectangleSphereGrid
source · pub struct RectangleSphereGrid<T, const W: usize, const H: usize> { /* private fields */ }
Expand description
Trait Implementations§
source§impl<T: Clone, const W: usize, const H: usize> Clone for RectangleSphereGrid<T, W, H>
impl<T: Clone, const W: usize, const H: usize> Clone for RectangleSphereGrid<T, W, H>
source§fn clone(&self) -> RectangleSphereGrid<T, W, H>
fn clone(&self) -> RectangleSphereGrid<T, W, H>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Default, const W: usize, const H: usize> Default for RectangleSphereGrid<T, W, H>
impl<T: Default, const W: usize, const H: usize> Default for RectangleSphereGrid<T, W, H>
source§fn default() -> RectangleSphereGrid<T, W, H>
fn default() -> RectangleSphereGrid<T, W, H>
Returns the “default value” for a type. Read more
source§impl<T, const W: usize, const H: usize> Index<RectangleSpherePoint<W, H>> for RectangleSphereGrid<T, W, H>
impl<T, const W: usize, const H: usize> Index<RectangleSpherePoint<W, H>> for RectangleSphereGrid<T, W, H>
source§impl<T, const W: usize, const H: usize> IndexMut<RectangleSpherePoint<W, H>> for RectangleSphereGrid<T, W, H>
impl<T, const W: usize, const H: usize> IndexMut<RectangleSpherePoint<W, H>> for RectangleSphereGrid<T, W, H>
source§impl<T, const W: usize, const H: usize> IntoIterator for RectangleSphereGrid<T, W, H>
impl<T, const W: usize, const H: usize> IntoIterator for RectangleSphereGrid<T, W, H>
§type Item = (RectangleSpherePoint<W, H>, T)
type Item = (RectangleSpherePoint<W, H>, T)
The type of the elements being iterated over.
§type IntoIter = IntoIter<<RectangleSphereGrid<T, W, H> as IntoIterator>::Item>
type IntoIter = IntoIter<<RectangleSphereGrid<T, W, H> as IntoIterator>::Item>
Which kind of iterator are we turning this into?
source§impl<T: PartialEq, const W: usize, const H: usize> PartialEq for RectangleSphereGrid<T, W, H>
impl<T: PartialEq, const W: usize, const H: usize> PartialEq for RectangleSphereGrid<T, W, H>
source§fn eq(&self, other: &RectangleSphereGrid<T, W, H>) -> bool
fn eq(&self, other: &RectangleSphereGrid<T, W, H>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T, const W: usize, const H: usize> SurfaceGrid<T> for RectangleSphereGrid<T, W, H>
impl<T, const W: usize, const H: usize> SurfaceGrid<T> for RectangleSphereGrid<T, W, H>
§type Point = RectangleSpherePoint<W, H>
type Point = RectangleSpherePoint<W, H>
The type of a point on this grid.
source§fn from_fn<F: FnMut(&Self::Point) -> T>(f: F) -> Self
fn from_fn<F: FnMut(&Self::Point) -> T>(f: F) -> Self
Creates a new surface grid by calling the specified function for each point in the grid. Read more
source§fn from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(f: F) -> Self
fn from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(f: F) -> Self
Creates a new surface grid by calling the specified function in parallel for each point in
the grid. Read more
source§fn set_from_fn<F: FnMut(&Self::Point) -> T>(&mut self, f: F)
fn set_from_fn<F: FnMut(&Self::Point) -> T>(&mut self, f: F)
Updates this surface grid by calling the specified function for each point in the grid. Read more
source§fn set_from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(&mut self, f: F)
fn set_from_fn_par<F: Fn(&Self::Point) -> T + Send + Sync>(&mut self, f: F)
Updates this surface grid by calling the specified function for each point in the grid in
parallel. Read more
source§fn iter<'a>(
&'a self
) -> impl Iterator<Item = (RectangleSpherePoint<W, H>, &'a T)>where
T: 'a,
fn iter<'a>(
&'a self
) -> impl Iterator<Item = (RectangleSpherePoint<W, H>, &'a T)>where
T: 'a,
Iterates over the points in this grid and their values.
source§fn par_iter<'a>(&'a self) -> impl ParallelIterator<Item = (Self::Point, &'a T)>
fn par_iter<'a>(&'a self) -> impl ParallelIterator<Item = (Self::Point, &'a T)>
Iterates over the points in this grid and their values in parallel.
source§fn par_points(&self) -> impl ParallelIterator<Item = Self::Point>
fn par_points(&self) -> impl ParallelIterator<Item = Self::Point>
Iterates over the points in this grid in parallel.
source§fn map_neighbours<F: FnMut(&T, &T, &T, &T, &T) -> T>(&self, f: F) -> Selfwhere
Self: Sized,
fn map_neighbours<F: FnMut(&T, &T, &T, &T, &T) -> T>(&self, f: F) -> Selfwhere
Self: Sized,
Applies a function to each cell and its direct neighbours. Read more
source§fn map_neighbours_diagonals<F: FnMut(&T, &T, &T, &T, &T, &T, &T, &T, &T) -> T>(
&self,
f: F
) -> Selfwhere
Self: Sized,
fn map_neighbours_diagonals<F: FnMut(&T, &T, &T, &T, &T, &T, &T, &T, &T) -> T>(
&self,
f: F
) -> Selfwhere
Self: Sized,
Applies a function to each cell and its direct neighbours including diagonals. Read more
impl<T: Eq, const W: usize, const H: usize> Eq for RectangleSphereGrid<T, W, H>
impl<T, const W: usize, const H: usize> StructuralEq for RectangleSphereGrid<T, W, H>
impl<T, const W: usize, const H: usize> StructuralPartialEq for RectangleSphereGrid<T, W, H>
Auto Trait Implementations§
impl<T, const W: usize, const H: usize> RefUnwindSafe for RectangleSphereGrid<T, W, H>where
T: RefUnwindSafe,
impl<T, const W: usize, const H: usize> Send for RectangleSphereGrid<T, W, H>where
T: Send,
impl<T, const W: usize, const H: usize> Sync for RectangleSphereGrid<T, W, H>where
T: Sync,
impl<T, const W: usize, const H: usize> Unpin for RectangleSphereGrid<T, W, H>
impl<T, const W: usize, const H: usize> UnwindSafe for RectangleSphereGrid<T, W, H>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more