pub struct RegArray<'a, P: ArrayElem<'a>, const N: usize> { /* private fields */ }
Expand description
Implementations§
Source§impl<'a, P: ArrayElem<'a>, const N: usize> RegArray<'a, P, N>
impl<'a, P: ArrayElem<'a>, const N: usize> RegArray<'a, P, N>
Sourcepub const fn as_ptr(&self) -> *mut [P::Target; N]
pub const fn as_ptr(&self) -> *mut [P::Target; N]
Returns a raw pointer to the underlying pointer array.
Sourcepub unsafe fn idx_unchecked(&self, index: usize) -> P
pub unsafe fn idx_unchecked(&self, index: usize) -> P
Access the pointer at index
, without doing bounds checking.
§Safety
index
must be in bounds: index < N
.
Sourcepub fn iter(
&self,
) -> impl 'a + ExactSizeIterator<Item = P> + DoubleEndedIterator + FusedIterator + Clone
pub fn iter( &self, ) -> impl 'a + ExactSizeIterator<Item = P> + DoubleEndedIterator + FusedIterator + Clone
Returns an iterator over the pointer array.
Sourcepub fn iter_slice(
&self,
start: usize,
end: usize,
) -> impl 'a + ExactSizeIterator<Item = P> + DoubleEndedIterator + FusedIterator + Clone
pub fn iter_slice( &self, start: usize, end: usize, ) -> impl 'a + ExactSizeIterator<Item = P> + DoubleEndedIterator + FusedIterator + Clone
Returns an iterator over a subslice [start..end]
of the pointer array.
§Panics
If [start..end]
is out of bounds.
Trait Implementations§
Auto Trait Implementations§
impl<'a, P, const N: usize> Freeze for RegArray<'a, P, N>
impl<'a, P, const N: usize> RefUnwindSafe for RegArray<'a, P, N>
impl<'a, P, const N: usize> !Send for RegArray<'a, P, N>
impl<'a, P, const N: usize> !Sync for RegArray<'a, P, N>
impl<'a, P, const N: usize> Unpin for RegArray<'a, P, N>
impl<'a, P, const N: usize> UnwindSafe for RegArray<'a, P, N>
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