pub trait KnownTuple<'a> {
    type RefTuple: 'a + KnownTuple<'a>;
    type FnPointer: KnownFnPointer<ArgsTuple = Self>;
}

Required Associated Types

The corresponding tuple type which references each item.

use tuple_fn::KnownTuple;

let _: <() as KnownTuple>::RefTuple = ();
let _: <(i32,) as KnownTuple>::RefTuple = (&1,);
let _: <(i32, bool) as KnownTuple>::RefTuple = (&1, &true);
let _: <(i32, bool, &u8) as KnownTuple>::RefTuple = (&1, &true, &&0u8);

The fn pointer type which accepts this tuple as arguments and returns (). For example, the following types in each pair are equivalent.

<() as KnownTuple>::FnPointer, fn()
<(i32,) as KnownTuple>::FnPointer, fn(i32)
<(i32, bool) as KnownTuple>::FnPointer, fn(i32, bool)

Implementations on Foreign Types

Implementors