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.
7pub trait TupleDefault {
8    /// Returns the default value of the tuple.
9    ///
10    /// # Examples
11    ///
12    /// ```rust
13    /// use tuplities_default::TupleDefault;
14    ///
15    /// let default_tuple: (i32, String, f64) = <(i32, String, f64)>::tuple_default();
16    ///
17    /// assert_eq!(default_tuple, (0, String::new(), 0.0));
18    /// ```
19    fn tuple_default() -> Self;
20}