pub struct AlignedGrid<S> { /* private fields */ }
Expand description
A continuous buffer in the “raster order”.
The buffer is aligned so that it can be used in SIMD instructions.
Implementations§
Source§impl<S> AlignedGrid<S>
impl<S> AlignedGrid<S>
Source§impl<S: Default + Clone> AlignedGrid<S>
impl<S: Default + Clone> AlignedGrid<S>
Sourcepub fn with_alloc_tracker(
width: usize,
height: usize,
tracker: Option<&AllocTracker>,
) -> Result<Self, Error>
pub fn with_alloc_tracker( width: usize, height: usize, tracker: Option<&AllocTracker>, ) -> Result<Self, Error>
Create a new buffer, recording the allocation if a tracker is given.
Sourcepub fn clone_untracked(&self) -> Self
pub fn clone_untracked(&self) -> Self
Clones the buffer without recording an allocation.
Source§impl<S> AlignedGrid<S>
impl<S> AlignedGrid<S>
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn tracker(&self) -> Option<AllocTracker>
pub fn get(&self, x: usize, y: usize) -> Option<&S>
pub fn get_mut(&mut self, x: usize, y: usize) -> Option<&mut S>
pub fn as_subgrid(&self) -> SharedSubgrid<'_, S>
pub fn as_subgrid_mut(&mut self) -> MutableSubgrid<'_, S>
Trait Implementations§
Source§impl<S> Debug for AlignedGrid<S>
impl<S> Debug for AlignedGrid<S>
Source§fn from(value: &'g AlignedGrid<V>) -> Self
fn from(value: &'g AlignedGrid<V>) -> Self
Converts to this type from the input type.
Source§impl<'g, V> From<&'g mut AlignedGrid<V>> for MutableSubgrid<'g, V>
impl<'g, V> From<&'g mut AlignedGrid<V>> for MutableSubgrid<'g, V>
Source§fn from(grid: &'g mut AlignedGrid<V>) -> Self
fn from(grid: &'g mut AlignedGrid<V>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<S> Freeze for AlignedGrid<S>
impl<S> RefUnwindSafe for AlignedGrid<S>where
S: RefUnwindSafe,
impl<S> Send for AlignedGrid<S>where
S: Send,
impl<S> Sync for AlignedGrid<S>where
S: Sync,
impl<S> Unpin for AlignedGrid<S>where
S: Unpin,
impl<S> UnwindSafe for AlignedGrid<S>where
S: 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