Skip to main content

ArrayExt

Trait ArrayExt 

Source
pub trait ArrayExt: Sealed {
    const LEN: usize;

    // Provided method
    fn fmt(&self) -> ArrayFmt<'_, Self>
       where Self: Sized { ... }
}
Expand description

🗃️ Extension trait providing convenience methods for [T; N] arrays.


📍 data/layout/array


This trait is sealed and cannot be implemented for any other type.

Required Associated Constants§

Source

const LEN: usize

The length of this array.

Provided Methods§

Source

fn fmt(&self) -> ArrayFmt<'_, Self>
where Self: Sized,

Wraps the array in an ArrayFmt for formatting purposes.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

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

Source§

const LEN: usize = LEN

Implementors§