MCPcopy Create free account
hub / github.com/cretz/stackparam / write_exception_handlers

Method write_exception_handlers

src/bytecode/io/writer.rs:632–640  ·  view source on GitHub ↗
(&mut self, exception_table: &Vec<ExceptionHandler>)

Source from the content-addressed store, hash-verified

630 }
631
632 fn write_exception_handlers(&mut self, exception_table: &Vec<ExceptionHandler>) -> Result<usize, Error> {
633 self.write_u16(exception_table.len() as u16)
634 .and(exception_table.iter().fold(Ok(0), |_, x| {
635 self.write_u16(x.start_pc)
636 .and(self.write_u16(x.end_pc))
637 .and(self.write_u16(x.handler_pc))
638 .and(self.write_u16(x.catch_type.idx as u16))
639 }))
640 }
641
642 pub fn write_n(&mut self, bytes: &Vec<u8>) -> Result<usize, Error> {
643 bytes.iter().fold(Ok(0), |acc, x| match acc {

Callers 1

write_attributeMethod · 0.80

Calls 2

write_u16Method · 0.80
lenMethod · 0.80

Tested by

no test coverage detected