use bytes::Bytes; use jce::JceStruct; #[derive(JceStruct, Debug)] struct V { a: Vec, b: B, } #[derive(JceStruct, Debug)] struct B { b: Bytes, ca: i32, cbb: Vec, } #[test] fn vec() { let v = V { a: vec![114, 127], b: B { b: Bytes::from_static(&[114, 5, 14]), ca: 114514, cbb: vec![114514, 1919810], }, }; let mut bytes: Vec = Vec::new(); v.encode(&mut bytes).unwrap(); println!("{:?}", bytes); println!("{:?}", V::decode(&*bytes).unwrap()); }