Size

Trait Size 

Source
pub trait Size:
    Debug
    + Copy
    + PartialEq {
    // Provided method
    fn each<I: Index<Size = Self>>(self, f: impl FnMut(I)) { ... }
}
Expand description

The run-time size of an array axis. An array axis with a compile-time constant size can simply use (), which implements this trait.

Types that implement Size should implement Isomorphic. The simplest and best way to achieve this for a non-tuple type is to implement NonTuple.

Provided Methods§

Source

fn each<I: Index<Size = Self>>(self, f: impl FnMut(I))

An abbreviation for I::each(self, f).

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 Size for ()

Source§

impl Size for usize

Source§

impl<A: Size> Size for (A,)

Source§

impl<A: Size, B: Size> Size for (A, B)

Source§

impl<A: Size, B: Size, C: Size> Size for (A, B, C)

Implementors§

Source§

impl<S: Size> Size for Coated<S>