I am writing bindings for a library, where I have a function with a parameter of type void* aka *mut c_void in Rust. I have to assign a [u8] to this parameter, how can I do this in Rust? I've tried casting, transmute, it doesn't work (transmute says that c_void and [u8] are of different sizes). If it matters, I am getting the array from a vector.
Aucun commentaire:
Enregistrer un commentaire