use crate::TocEntry;
pub mod entry;
pub mod reader;
pub mod writer;
pub struct Toc(pub(crate) Vec<TocEntry>);
impl Toc {
#[must_use]
pub fn section(&self, name: &[u8]) -> Option<&TocEntry> {
self.iter().find(|entry| entry.name() == name)
}
}
impl std::ops::Deref for Toc {
type Target = [TocEntry];
fn deref(&self) -> &Self::Target {
&self.0
}
}