Returns the ivar for a specified instance variable of self, or `None` if self has no ivar with the given name.
(&self, name: &str)
| 343 | /// Returns the ivar for a specified instance variable of self, or `None` |
| 344 | /// if self has no ivar with the given name. |
| 345 | pub fn instance_variable(&self, name: &str) -> Option<&Ivar> { |
| 346 | let name = CString::new(name).unwrap(); |
| 347 | unsafe { |
| 348 | let ivar = class_getInstanceVariable(self, name.as_ptr()); |
| 349 | if ivar.is_null() { None } else { Some(&*ivar) } |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | /// Describes the instance methods implemented by self. |
| 354 | pub fn instance_methods(&self) -> MallocBuffer<&Method> { |