You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing rust bindings for a the C++ API that is available here.
I'm struggling to figure out how best to convert a specific pattern.
The C++ code has this structure:
Type V is pure virtual (=0 after one of its methods) and is used almost like a trait in rust. Where a function is made generic by accepting this type.
Type A has a method that takes an object of type V, this method stores this object for later use.
I'm implementing rust bindings for a the C++ API that is available here.
I'm struggling to figure out how best to convert a specific pattern.
The C++ code has this structure:
Type
V
is pure virtual (=0
after one of its methods) and is used almost like a trait in rust. Where a function is made generic by accepting this type.Type
A
has a method that takes an object of typeV
, this method stores this object for later use.For a concrete example, here is an example of
V
:And this is a reduced example of the object
A
:How do you think I can create a safe rust FFI for a pattern like this?
The text was updated successfully, but these errors were encountered: