#tuple #generics #variadic #traits #attempt #lack #rusts

no-std variadic_generics

A first attempt in using traits & tuples to work around Rusts lack of variadic generics

3 releases

0.1.2 Nov 9, 2021
0.1.1 Apr 7, 2017
0.1.0 Apr 7, 2017

#1995 in Rust patterns

Download history 30/week @ 2024-02-25 5/week @ 2024-03-03 7/week @ 2024-03-10 45/week @ 2024-03-31

53 downloads per month
Used in 2 crates

MIT license

17KB
162 lines

variadic_generics

A first attempt in using traits & tuples to work around Rusts lack of variadic generics.

example usage

Add to your Cargo.toml:

[dependencies]
variadic_generics = "0.1"

Add to your crate root:

#[macro_use]
extern crate variadic_generics;
  • option_tuple showcases how to implement flatwrap(Option<T>...) -> Option<(T...)>

contribution guidelines

Make sure to cargo install rustfmt and cargo fmt the codebase before creating any commits!

No runtime deps