Adds a protocol to self. Panics if the protocol wasn't successfully added
(&mut self, proto: &Protocol)
| 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`. |
no outgoing calls