use std::fmt::Debug;
use moretypes::named_tuple;
#[named_tuple]
struct Triple<T> {
x: T,
y: T,
z: T,
}
#[named_tuple(tuple_methods = false)]
#[derive(Debug)]
#[allow(dead_code)]
struct NoTupleMethods<'a> {
foo: &'a str,
bar: &'a str,
}
#[named_tuple(constructor = false)]
struct NoConstructor {
width: u32,
height: u32,
}
pub fn main() {
let it = Triple::new(1.0, 3.0, 5.0);
println!("{:?}", it.as_tuple());
let it = NoTupleMethods::new("foo", "bar");
println!("{it:?}");
let it = NoConstructor::from((1920, 1080));
println!("{:?}", it.as_tuple());
}