Let assume I need to send a vector form one program to another. The way I am doing it right now is :
let v : Vec<i32> = vec![5i32; 10] fn myfunction ( v.as_ptr(), // pointer to my vec 10 // its length )
But how would I do the same for a vector slice? do I need to make a copy of
v and then repeat the procedure or can I say something like:
fm my function ( v.as_ptr() // so I want to send a slice starting at 4 of length 4 4 )
Any advice ?