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

Method write_fields

src/bytecode/io/writer.rs:82–89  ·  view source on GitHub ↗
(&mut self, fields: &Vec<Field>, cp: &ConstantPool)

Source from the content-addressed store, hash-verified

80 }
81
82 fn write_fields(&mut self, fields: &Vec<Field>, cp: &ConstantPool) -> Result<usize, Error> {
83 fields.iter().fold(self.write_u16(fields.len() as u16), |acc, x| {
84 match acc {
85 Ok(ctr) => self.write_field(x, cp).map(|c| c + ctr),
86 err@_ => err
87 }
88 })
89 }
90
91 fn write_field(&mut self, field: &Field, cp: &ConstantPool) -> Result<usize, Error> {
92 self.write_access_flags(&field.access_flags)

Callers 1

write_classMethod · 0.80

Calls 3

write_u16Method · 0.80
lenMethod · 0.80
write_fieldMethod · 0.80

Tested by

no test coverage detected