signalapp / libsignal

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible.
GNU Affero General Public License v3.0
3.55k stars 415 forks source link

bridge: Simplify the ffi_bridge_handle macro using a marker trait #383

Closed jrose-signal closed 3 years ago

jrose-signal commented 3 years ago

Previously, several trait implementations were generated from the ffi_bridge_handle! macro. Now, the macro opts in to a single marker trait, ffi::BridgeHandle, which is used to implement the argument and result traits for various types that use wrapped Rust values. The implementations have not changed, which is easier to see with whitespace diffing turned off.