Type Indexing into Rust Tuples
Provides a trait TypeAt which allow to query the n-th type of a Rust tuple at compile time.
Example: Simple
use TypeAt;
let _: i8 = default;
let _: i16 = default;
let _: i32 = default;
let _: i64 = default;
Example: Nested
use TypeAt;
let _: i64 = default;
Example: Derive
;
let _: i8 = default;
let _: i16 = default;
let _: i32 = default;
let _: i8 = default;
let _: i16 = default;
let _: i32 = default;
License
Licensed under either of
- Apache license, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Dual licence: ![badge][license-mit-badge] ![badge][license-apache-badge]
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.