1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
use crate::entry_id::EntryId;

pub struct Entry<'a> {
    pub id: EntryId,
    pub lump: &'a [u8],
}

impl<'a> Entry<'a> {
    /// Lossy display representation. If the ID contains non-ASCII characters,
    /// this function will return "?".
    pub fn display_name(&self) -> &str {
        self.id.display()
    }
}