madsmtm / objc2

Bindings to Apple's frameworks in Rust
https://docs.rs/objc2/
MIT License
290 stars 35 forks source link

Better document the different ways of implementing `NSCopying` #534

Open madsmtm opened 6 months ago

madsmtm commented 6 months ago

NSCopying states that there are a few different ways to implement it.

One of them is by invoking [super copy] and setting the instance variables afterwards - this should somehow be supported in objc2 with msg_send_id! (although it should definitely be unsafe), and we should probably document this.