// Copyright (c) 2025-present, fjall-rs
// This source code is licensed under both the Apache 2.0 and MIT License
// (found in the LICENSE-* files in the repository)
#[cfg(not(feature ="std"))]usealloc::vec::Vec;usecrate::sfa::TocEntry;pubmodentry;pubmodreader;pubmodwriter;/// Table of contents
pubstructToc(pub(crate)Vec<TocEntry>);implToc{/// Helper method to find a section by name.
#[must_use]pubfnsection(&self, name:&[u8])->Option<&TocEntry>{self.iter().find(|entry|entry.name()== name)}}implcore::ops::Deref forToc{typeTarget=[TocEntry];fnderef(&self)->&Self::Target{&self.0}}