selector

Macro selector 

Source
pub macro selector($methname:expr) {
    ...
}
🔬This is a nightly-only experimental API. (darwin_objc #145496)
Available on Apple only.
Expand description

Gets a reference to an Objective-C selector.

This macro will yield an expression of type SEL for the given method name string literal.

It is similar to Objective-C’s @selector directive.

§Examples

#![feature(darwin_objc)]
use core::os::darwin::objc;

let alloc_sel = objc::selector!("alloc");
let init_sel = objc::selector!("initWithCString:encoding:");