macro_rules! msg_send_bool {
    [$($msg_send_args:tt)+] => { ... };
}
Expand description

A less error-prone version of msg_send! for methods returning BOOL.

Objective-C’s BOOL is different from Rust’s bool (see Bool), so a conversion step must be performed before using it - this macro does that for you!

Equivalent to the following:

{
    let result: Bool = msg_send![obj, selector];
    result.as_bool()
};

Examples

assert!(unsafe { msg_send_bool![obj, isEqual: obj] });