[][src]Struct mod_utilities::wrapped_array::WrappedArray

pub struct WrappedArray<T, const N: usize>(pub [T; N]);

A const generic wrapper type for doing more by-value operations on Arrays

Implementations

impl<T, const N: usize> WrappedArray<T, N>[src]

pub unsafe fn zeroed() -> Self[src]

Get a zero-initialized array

Safety

This is only safe if your array elements are valid when their bytes are all zero

pub fn as_ptr(&self) -> *const T[src]

Get a pointer to the first element of a WrappedArray

pub fn as_mut_ptr(&mut self) -> *mut T[src]

Get a mutable pointer to the first element of a WrappedArray

Trait Implementations

impl<T, const N: usize> AsMut<[T]> for WrappedArray<T, N>[src]

impl<T, const N: usize> AsRef<[T]> for WrappedArray<T, N>[src]

impl<T, const N: usize> Deref for WrappedArray<T, N>[src]

type Target = [T; N]

The resulting type after dereferencing.

impl<T, const N: usize> DerefMut for WrappedArray<T, N>[src]

impl<T, const N: usize> From<[T; N]> for WrappedArray<T, N>[src]

impl<T, const N: usize> From<WrappedArray<T, N>> for [T; N][src]

impl<T, const N: usize> FromIterator<T> for WrappedArray<T, N>[src]

impl<T, const N: usize> Index<usize> for WrappedArray<T, N>[src]

type Output = T

The returned type after indexing.

impl<T, const N: usize> IndexMut<usize> for WrappedArray<T, N>[src]

impl<T: Copy, const N: usize> IntoIterator for WrappedArray<T, N>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T, N>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<const N: usize, T> RefUnwindSafe for WrappedArray<T, N> where
    T: RefUnwindSafe

impl<const N: usize, T> Send for WrappedArray<T, N> where
    T: Send

impl<const N: usize, T> Sync for WrappedArray<T, N> where
    T: Sync

impl<const N: usize, T> Unpin for WrappedArray<T, N> where
    T: Unpin

impl<const N: usize, T> UnwindSafe for WrappedArray<T, N> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.