Crates.io | fast_tuple |
lib.rs | fast_tuple |
version | 0.1.3 |
source | src |
created_at | 2019-12-16 14:48:19.80928 |
updated_at | 2019-12-22 17:27:17.722777 |
description | This is a Rust procedural macro library that provides an easy way to construct and annotate tuples. |
homepage | |
repository | https://github.com/NonNullableName/fast_tuple |
max_upload_size | |
id | 189765 |
size | 5,827 |
This procedural macro crate provides a way to construct and annotate tuple types like arrays in Rust.
!#[feature(proc_macro_hygiene)] // required for expansion to expressions
use fast_tuple::tuple;
fn main() {
let tuple: tuple!(u32; 2) = tuple!(2; 2);
println!("{}, {}", tuple.0, tuple.1); // prints 2, 2
}
This is a nigthly-only crate at the moment, unless you only use it for annotate types,this macro is also no_std only when debug assertions are disabled.