use byteorder::{LE, ReadBytesExt};
use std::io::BufRead;
use crate::Result;
use crate::common::extensions::Enumerable;
#[derive(Default, Debug)]
pub struct TagReference {
pub field_block: i32,
pub field_offset: u32,
pub(crate) name_offset: u32,
pub dependency_index: i32,
pub name: Option<String>,
}
impl Enumerable for TagReference {
fn read<R: BufRead>(&mut self, reader: &mut R) -> Result<()> {
self.field_block = reader.read_i32::<LE>()?;
self.field_offset = reader.read_u32::<LE>()?;
self.name_offset = reader.read_u32::<LE>()?;
self.dependency_index = reader.read_i32::<LE>()?;
Ok(())
}
}