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

Method add_protocol

src/declare.rs:221–224  ·  view source on GitHub ↗

Adds a protocol to self. Panics if the protocol wasn't successfully added

(&mut self, proto: &Protocol)

Source from the content-addressed store, hash-verified

219 /// Adds a protocol to self. Panics if the protocol wasn't successfully
220 /// added
221 pub fn add_protocol(&mut self, proto: &Protocol) {
222 let success = unsafe { runtime::class_addProtocol(self.cls, proto) };
223 assert!(success != NO, "Failed to add protocol {:?}", proto);
224 }
225
226 /// Registers self, consuming it and returning a reference to the
227 /// newly registered `Class`.

Callers 2

custom_classFunction · 0.80
custom_subprotocolFunction · 0.80

Calls

no outgoing calls

Tested by 2

custom_classFunction · 0.64
custom_subprotocolFunction · 0.64