Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

Make ComItf safer #120

Closed Rantanen closed 4 years ago

Rantanen commented 4 years ago

ComItf is now extern type only as &ComItf - this prevents users from writing methods that accept input parameters as ComItf<I>, which is an owned type with no ties to a lifetime. Also removed the Clone implementation from ComItf which would have allowed the user to bypass the reference counting.

Removal of Clone required changes to the way errors are stored as the previous Cell needed a Copy type - then again, we already did add_ref/release around the cell storage so we should have just used ComRc instead.