Skip to main content

ArrayWithType

Trait ArrayWithType 

Source
pub trait ArrayWithType<T, const N: usize>: Array<T, N> {
    type WithType<T2>: ArrayWithType<T2, N>;
}
Expand description

An array with a generic type that can be changed

ex, [T;N] is an array with a generic type, but struct VecF32<const N: usize>([f32;N]) don’t have a generic type (4 components)

Required Associated Types§

Source

type WithType<T2>: ArrayWithType<T2, N>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Implementors§