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

Method read_attribute

src/bytecode/io/reader.rs:298–309  ·  view source on GitHub ↗
(reader: &mut BlockReader, cf: &ClassFragment)

Source from the content-addressed store, hash-verified

296 }
297
298 fn read_attribute(reader: &mut BlockReader, cf: &ClassFragment) -> Result<Attribute, Error> {
299 match reader.read_u16() {
300 Ok(n_idx) => match reader.read_u32() {
301 Ok(a_len) => match reader.read_n(a_len as usize) {
302 Ok(mut bytes) => Ok(ClassReader::parse_attribute(n_idx, BlockReader::new(&mut Cursor::new(&mut bytes)), cf)),
303 Err(err) => Err(err)
304 },
305 Err(err) => Err(err)
306 },
307 Err(err) => Err(err)
308 }
309 }
310
311 fn parse_code(len: usize, reader: &mut BlockReader) -> Vec<Instruction> {
312 /*

Callers

nothing calls this directly

Calls 3

read_u16Method · 0.80
read_u32Method · 0.80
read_nMethod · 0.80

Tested by

no test coverage detected