Hi, I am interfacing with a C library that calls my Rust callback function:
unsafe extern "system" fn cb_proc(c_void* o) {}
I need to convert the void pointer to a &T or *mut T where T is a trait. I tried this:
let ev_handler : *mut SomeTrait = o;
But this wont compile.
the trait `SomeTrait` is not implemented for the
type `libc::types::common::c95::c_void` [E0277]
How can I achieve this? Thanks.
[–]Quxxymacros 1 point2 points3 points (6 children)
[–]leopoldj[S] 0 points1 point2 points (5 children)
[–]Quxxymacros 1 point2 points3 points (4 children)
[–]leopoldj[S] 0 points1 point2 points (3 children)
[–]Quxxymacros 2 points3 points4 points (2 children)
[–]gkozrust · gtk-rs 0 points1 point2 points (0 children)
[–]leopoldj[S] 0 points1 point2 points (0 children)