pub trait TupleDefault {
// Required method
fn tuple_default() -> Self;
}Expand description
A trait for creating default instances of tuples.
Part of the tuplities crate.
Required Methods§
Sourcefn tuple_default() -> Self
fn tuple_default() -> Self
Returns the default value of the tuple.
§Examples
use tuplities_default::TupleDefault;
let default_tuple: (i32, String, f64) = <(i32, String, f64)>::tuple_default();
assert_eq!(default_tuple, (0, String::new(), 0.0));Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.