MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / into_iter

Method into_iter

crates/unwinder/src/exception_table.rs:402–414  ·  view source on GitHub ↗

Provide an iterator over callsites, and for each callsite, the frame offset and arrays of handlers.

(self)

Source from the content-addressed store, hash-verified

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
417fn option_from_u32(value: u32) -> Option<u32> {

Callers 2

lookup_pcMethod · 0.45

Calls 6

option_from_u32Function · 0.85
collectMethod · 0.80
handlers_for_callsiteMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45
getMethod · 0.45

Tested by 1