pub struct InkbIndex {
pub version: u16,
pub file_size: u32,
pub checksum: u32,
pub sections: Vec<SectionEntry>,
}Expand description
Parsed header + offset table from an .inkb file.
Allows selective reads without parsing section data.
Fields§
§version: u16§file_size: u32§checksum: u32§sections: Vec<SectionEntry>Implementations§
Source§impl InkbIndex
impl InkbIndex
Sourcepub fn header_size(&self) -> usize
pub fn header_size(&self) -> usize
Total header size in bytes (preamble + offset table).
Sourcepub fn section_range(&self, kind: SectionKind) -> Option<Range<usize>>
pub fn section_range(&self, kind: SectionKind) -> Option<Range<usize>>
Returns (offset, length) for a section, computing length from the
next section’s offset (or file_size for the last section).
Subtraction is safe because read_inkb_index validates that offsets
are monotonically increasing and within [header_size, file_size].
Trait Implementations§
impl Eq for InkbIndex
impl StructuralPartialEq for InkbIndex
Auto Trait Implementations§
impl Freeze for InkbIndex
impl RefUnwindSafe for InkbIndex
impl Send for InkbIndex
impl Sync for InkbIndex
impl Unpin for InkbIndex
impl UnsafeUnpin for InkbIndex
impl UnwindSafe for InkbIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more