How to return a vector of structs from Rust to C#?
问题 How is it possible to write Rust code like the C code below? This is my Rust code so far, without the option to marshal it: pub struct PackChar { id: u32, val_str: String, } #[no_mangle] pub extern "C" fn get_packs_char(size: u32) -> Vec<PackChar> { let mut out_vec = Vec::new(); for i in 0..size { let int_0 = '0' as u32; let last_char_val = int_0 + i % (126 - int_0); let last_char = char::from_u32(last_char_val).unwrap(); let buffer = format!("abcdefgHi{}", last_char); let pack_char =