(&self)
| 64 | } |
| 65 | |
| 66 | /// Look up a section by kind, returning its byte content (or an empty slice). |
| 67 | pub fn section_bytes(&self, kind: &SectionKind) -> &[u8] { |
| 68 | self.sections |
| 69 | .iter() |
| 70 | .find(|s| s.kind.as_ref() == Some(kind)) |
| 71 | .map(|s| s.bytes.as_slice()) |