Trait HomogeneousTuple

Source
pub trait HomogeneousTuple<Item>: Tuple {
    type Array: Array<Item = Item>;

    // Required methods
    fn into_array(self) -> Self::Array
       where Self: Sized;
    fn from_array(array: Self::Array) -> Self;
}

Required Associated Types§

Source

type Array: Array<Item = Item>

Required Methods§

Source

fn into_array(self) -> Self::Array
where Self: Sized,

Source

fn from_array(array: Self::Array) -> Self

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> HomogeneousTuple<T> for (T₁, T₂, …, Tₙ)

This trait is implemented for tuples up to 12 items long.

Source§

type Array = [T; 1]

Source§

fn into_array(self) -> Self::Array
where Self: Sized,

Source§

fn from_array(array: Self::Array) -> Self

Source§

impl<T> HomogeneousTuple<T> for ()

Source§

type Array = [T; 0]

Source§

fn into_array(self) -> Self::Array
where Self: Sized,

Source§

fn from_array(_array: Self::Array) -> Self

Implementors§