use atruct::Return; fn main() { let abc = get_abc(); println!("{}", abc.a); // 24 println!("{}", abc.b); // you can use any type for a field println!("{:?}", abc.c); // [-1, 0, 0, -1, 1, 0, 1, -1] } #[Return(a: u8, b: String, c: Vec)] // not supporting nest fn get_abc() { Return { a: 24, b: "you can use any type in a field".into(), c: vec![-1,0,0,-1,1,0,1,-1], } }