MCPcopy Create free account
hub / github.com/SSheldon/rust-objc / verify_message

Method verify_message

src/message/mod.rs:99–103  ·  view source on GitHub ↗

Verifies that the argument and return types match the encoding of the method for the given selector. This will look up the encoding of the method for the given selector, `sel`, and return a `MessageError` if any encodings differ for the arguments `A` and return type `R`. # Example ``` no_run # #[macro_use] extern crate objc; # use objc::runtime::{BOOL, Class, Obje

(&self, sel: Sel)

Source from the content-addressed store, hash-verified

97 ```
98 */
99 fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
100 where Self: Sized, A: EncodeArguments, R: Encode {
101 let obj = unsafe { &*(self as *const _ as *const Object) };
102 verify_message_signature::<A, R>(obj.class(), sel)
103 }
104}
105
106unsafe impl Message for Object { }

Callers

nothing calls this directly

Implementers 1

mod.rssrc/message/mod.rs

Calls 1

classMethod · 0.80

Tested by

no test coverage detected