pub struct NameEntry<'a> {
offset: usize,
name: &'a str,
hreftype: i32,
next_hash: i32,
flags: u8,
hashcode: u16,
}
impl<'a> NameEntry<'a> {
pub(crate) fn new(
offset: usize,
name: &'a str,
hreftype: i32,
next_hash: i32,
flags: u8,
hashcode: u16,
) -> Self {
Self {
offset,
name,
hreftype,
next_hash,
flags,
hashcode,
}
}
#[inline]
pub fn offset(&self) -> usize {
self.offset
}
#[inline]
pub fn name(&self) -> &'a str {
self.name
}
#[inline]
pub fn hreftype(&self) -> i32 {
self.hreftype
}
#[inline]
pub fn next_hash(&self) -> i32 {
self.next_hash
}
#[inline]
pub fn name_flags(&self) -> u8 {
self.flags
}
#[inline]
pub fn hashcode(&self) -> u16 {
self.hashcode
}
}