Skip to main content

Array

Trait Array 

Source
pub trait Array<T>: IntoIterator<Item = T> {
    type Dim: Dim;

    // Required method
    fn dim(&self) -> Self::Dim;
}
Expand description

Represents either [T; N] or Vec<T>

Required Associated Types§

Required Methods§

Source

fn dim(&self) -> Self::Dim

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

type Dim = Const<N>

Source§

fn dim(&self) -> Self::Dim

Source§

impl<T> Array<T> for Vec<T>

Source§

type Dim = usize

Source§

fn dim(&self) -> Self::Dim

Implementors§