macro_rules! selector {
    ($($sel:tt)*) => { ... };
}
Expand description

Creates a Sel from a selector literal.

Feature Flag

This macro is defined in objc, which requires the objc feature flag.

Examples

This macro accepts anything that can go in Objective-C’s @selector:

use fruity::selector;

let sel = selector!(init);
let sel = selector!(initWithArg:);
let sel = selector!(initWithArg:arg2:);

Invalid selectors will fail to compile:

let sel = selector!(initWithArg::);