(&mut self, sel: Sel, is_required: bool,
is_instance_method: bool)
| 266 | } |
| 267 | |
| 268 | fn add_method_description_common<Args, Ret>(&mut self, sel: Sel, is_required: bool, |
| 269 | is_instance_method: bool) |
| 270 | where Args: EncodeArguments, |
| 271 | Ret: Encode { |
| 272 | let encs = Args::encodings(); |
| 273 | let encs = encs.as_ref(); |
| 274 | let sel_args = count_args(sel); |
| 275 | assert!(sel_args == encs.len(), |
| 276 | "Selector accepts {} arguments, but function accepts {}", |
| 277 | sel_args, encs.len(), |
| 278 | ); |
| 279 | let types = method_type_encoding(&Ret::encode(), encs); |
| 280 | unsafe { |
| 281 | runtime::protocol_addMethodDescription( |
| 282 | self.proto, sel, types.as_ptr(), is_required as BOOL, is_instance_method as BOOL); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | /// Adds an instance method declaration with a given description to self. |
| 287 | pub fn add_method_description<Args, Ret>(&mut self, sel: Sel, is_required: bool) |
nothing calls this directly
no test coverage detected