palette

Trait ArrayExt

source
pub unsafe trait ArrayExt {
    type Item;

    const LENGTH: usize;
}
Expand description

Extension trait for fixed size arrays.

§Safety

  • Item must be the type of the array’s items (eg: T in [T; N]).
  • LENGTH must be the length of the array (eg: N in [T; N]).

Required Associated Constants§

source

const LENGTH: usize

The number of items in the array.

Required Associated Types§

source

type Item

The type of the array’s items.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, const N: usize> ArrayExt for [T; N]

source§

const LENGTH: usize = N

source§

type Item = T

Implementors§