Provide an iterator over callsites, and for each callsite, the frame offset and arrays of handlers.
(self)
| 400 | /// Provide an iterator over callsites, and for each callsite, the |
| 401 | /// frame offset and arrays of handlers. |
| 402 | pub fn into_iter(self) -> impl Iterator<Item = (u32, Option<u32>, Vec<ExceptionHandler>)> + 'a { |
| 403 | self.callsites |
| 404 | .iter() |
| 405 | .map(|pc| pc.get(LittleEndian)) |
| 406 | .enumerate() |
| 407 | .map(move |(i, pc)| { |
| 408 | ( |
| 409 | pc, |
| 410 | option_from_u32(self.frame_offsets[i].get(LittleEndian)), |
| 411 | self.handlers_for_callsite(i).collect(), |
| 412 | ) |
| 413 | }) |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | fn option_from_u32(value: u32) -> Option<u32> { |