pub unsafe trait Message: RefEncode { }
Expand description

Types that can be sent Objective-C messages.

Implementing this provides MessageReceiver implementations for common pointer types and references to the type, which allows using them as the receiver (first argument) in the msg_send! macro.

Safety

A pointer to the type must be able to be the receiver of an Objective-C message sent with objc_msgSend or similar.

The object must also respond to the retain, release and autorelease messages, as that allows it to be used with rc::Id.

Additionally, the type must implement RefEncode and adhere to the safety requirements therein.

Implementors