Make implementing ClassType
in declare_class!
safe
#528
Labels
A-objc2
Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates
enhancement
New feature or request
Milestone
Implementing
ClassType
indeclare_class!
isunsafe
because we need the user to uphold a few safety guarantees, and that was just the most convenient place to put theunsafe
keyword.After #521 though, the only safety guarantees that the user needs to uphold are:
ClassType::Super
may have must be upheld.ClassType::Mutability
must be correct.Drop
must be implemented correctly.We should work on ways to make fulfilling these
unsafe
requirements more granular.One possibility for requirement 2 would be to migrate from an associated type
Mutability
to a constant, that you must initialize withunsafe
if you need certain features:The text was updated successfully, but these errors were encountered: