Trait TupleExt

Source
pub trait TupleExt {
    // Required methods
    fn types() -> Vec<Type>;
    fn type_ids() -> Vec<TypeId>;
    fn type_names() -> Vec<&'static str>;

    // Provided methods
    fn self_types(&self) -> Vec<Type> { ... }
    fn self_type_ids(&self) -> Vec<TypeId> { ... }
    fn self_type_names(&self) -> Vec<&'static str> { ... }
}
Expand description

Extension Trait that adds the TupleExt::types, TupleExt::type_ids and TupleExt::type_names functions along with methods with the prefix self_.

Required Methods§

Source

fn types() -> Vec<Type>

Returns the types that make up the tuple with TupleExt is implemented on.

Source

fn type_ids() -> Vec<TypeId>

Returns the TypeIds of the type with TupleExt is implemented on.

Source

fn type_names() -> Vec<&'static str>

Provided Methods§

Source

fn self_types(&self) -> Vec<Type>

Method version of TupleExt::types.

Source

fn self_type_ids(&self) -> Vec<TypeId>

Method version of TupleExt::type_ids.

Source

fn self_type_names(&self) -> Vec<&'static str>

Method version of TupleExt::type_names.

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

Source§

impl<T1: 'static> TupleExt for (T1,)

Source§

impl<T1: 'static, T2: 'static> TupleExt for (T1, T2)

Source§

impl<T1: 'static, T2: 'static, T3: 'static> TupleExt for (T1, T2, T3)

Source§

impl<T1: 'static, T2: 'static, T3: 'static, T4: 'static> TupleExt for (T1, T2, T3, T4)

Source§

impl<T1: 'static, T2: 'static, T3: 'static, T4: 'static, T5: 'static> TupleExt for (T1, T2, T3, T4, T5)

Source§

impl<T1: 'static, T2: 'static, T3: 'static, T4: 'static, T5: 'static, T6: 'static> TupleExt for (T1, T2, T3, T4, T5, T6)

Source§

impl<T1: 'static, T2: 'static, T3: 'static, T4: 'static, T5: 'static, T6: 'static, T7: 'static> TupleExt for (T1, T2, T3, T4, T5, T6, T7)

Implementors§