use constructor_lite::ConstructorLite; #[derive(Debug, PartialEq, ConstructorLite)] struct Movie where S: AsRef, { title: S, year: Option, } #[test] fn test_generics() { assert_eq!( Movie::new("Star Wars"), Movie { title: "Star Wars", year: None } ) }