Trait objc::MessageArguments [] [src]

pub trait MessageArguments {
    unsafe fn send<T, R>(self, obj: *mut T, sel: Sel) -> R where T: Message, R: Any;
    unsafe fn send_super<T, R>(self, obj: *mut T, superclass: &Class, sel: Sel) -> R where T: Message, R: Any;
}

Types that may be used as the arguments of an Objective-C message.

Required Methods

unsafe fn send<T, R>(self, obj: *mut T, sel: Sel) -> R where T: Message, R: Any

Sends a message to the given obj with the given selector and self as the arguments.

The correct version of objc_msgSend will be chosen based on the return type. For more information, see Apple's documenation: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ObjCRuntimeRef/index.html#//apple_ref/doc/uid/TP40001418-CH1g-88778

It is recommended to use the msg_send! macro rather than calling this method directly.

unsafe fn send_super<T, R>(self, obj: *mut T, superclass: &Class, sel: Sel) -> R where T: Message, R: Any

Sends a message to the superclass of an instance of a class with self as the arguments.

Implementors