tuplities_default/lib.rs
1#![no_std]
2
3//! [tuplities](https://github.com/lucacappelletti94/tuplities) suite crate providing the `TupleDefault` trait.
4
5#[tuplities_derive::impl_tuple_default]
6/// A trait for creating default instances of tuples.
7///
8/// Part of the [`tuplities`](https://docs.rs/tuplities/latest/tuplities/) crate.
9pub trait TupleDefault {
10 /// Returns the default value of the tuple.
11 ///
12 /// # Examples
13 ///
14 /// ```rust
15 /// use tuplities_default::TupleDefault;
16 ///
17 /// let default_tuple: (i32, String, f64) = <(i32, String, f64)>::tuple_default();
18 ///
19 /// assert_eq!(default_tuple, (0, String::new(), 0.0));
20 /// ```
21 fn tuple_default() -> Self;
22}