fn create_pyvec<T>(vec: Vec<T>) -> PyVec {
    let res = PyVec {
        data: vec.as_ptr() as *const c_void,
        len: vec.len(),
    };
    mem::forget(vec);
    res
}
/// Creates a PyVec struct for ffi
/// CAUTION: it will make no assumption of the size of the data (byte, u32, f32...)
/// On the python side, the client is responsible for unpacking the data accordingly
/// Will cause intentional memory leak in rust (mem management handled by python)
Creates a PyVec struct for ffi
CAUTION: it will make no assumption of the size of the data (byte, u32, f32...)
On the python side, the client is responsible for unpacking the data accordingly
Will cause intentional memory leak in rust (mem management handled by python)
Creates a PyVec struct for ffi CAUTION : it will make no assumption of the size of the data ( byte u32 f32 ... ) On the python side the client is responsible for unpacking the data accordingly Will cause intentional memory leak in rust ( mem management handled by python )
fn create_pyvec<T>(vec: Vec<T>) -> PyVec {
    let res = PyVec {
        data: vec.as_ptr() as *const c_void,
        len: vec.len(),
    };
    mem::forget(vec);
    res
}
fn create_pyvec < T > ( vec : Vec < T > ) -> PyVec { let res = PyVec { data : vec . as_ptr ( ) as * const c_void , len : vec . len ( ) , } ; mem :: forget ( vec ) ; res }
Creates a PyVec struct for ffi
CAUTION: it will make no assumption of the size of the data (byte, u32, f32...)
On the python side, the client is responsible for unpacking the data accordingly
Will cause intentional memory leak in rust (mem management handled by python)
Creates a PyVec struct for ffi CAUTION : it will make no assumption of the size of the data ( byte u32 f32 ... ) On the python side the client is responsible for unpacking the data accordingly Will cause intentional memory leak in rust ( mem management handled by python )
vec
Vec<T>
vec
Vec<T>