(&self, name: S)
| 894 | } |
| 895 | |
| 896 | fn section_by_name<S: BnStrCompatible>(&self, name: S) -> Option<Ref<Section>> { |
| 897 | unsafe { |
| 898 | let raw_name = name.into_bytes_with_nul(); |
| 899 | let name_ptr = raw_name.as_ref().as_ptr() as *mut _; |
| 900 | let raw_section_ptr = BNGetSectionByName(self.as_ref().handle, name_ptr); |
| 901 | match raw_section_ptr.is_null() { |
| 902 | false => Some(Section::ref_from_raw(raw_section_ptr)), |
| 903 | true => None, |
| 904 | } |
| 905 | } |
| 906 | } |
| 907 | |
| 908 | fn sections(&self) -> Array<Section> { |
| 909 | unsafe { |
no test coverage detected