mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 15:20:24 +01:00
In general, it maps: * Traits to a struct with a void* and a list of function pointers, emulating what the compiler will do for a dyn trait anyway, * Structs as a struct with a single opaque pointer to the underlying type and a flag to indicate ownership. While this is a bit less effecient than just a direct pointer, it neatly lets us expose in the public interface the concept of ownership by setting a flag in the generated struct. * Unit enums as enums with each type copied over and conversion functions, * Non-unit enums have each field converted back and forth with a type flag and a union across all the C-mapped fields. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |