pub struct SectionDirectoryEntry {
pub section_type: SectionType,
pub version: u8,
pub flags: SectionFlags,
pub offset: u64,
pub length: u64,
pub checksum: u32,
}Expand description
A single entry in the container’s section directory.
Fixed 32-byte layout for on-disk storage:
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | section_type (u32 LE) |
| 4 | 1 | version (u8) |
| 5 | 1 | flags (packed byte) |
| 6 | 2 | reserved (zero) |
| 8 | 8 | offset (u64 LE, byte offset from file start) |
| 16 | 8 | length (u64 LE, byte length of section data) |
| 24 | 4 | checksum (u32 LE, CRC-32 of section data) |
| 28 | 4 | reserved (zero) |
Fields§
§section_type: SectionTypeWhich section type this entry describes.
version: u8Per-section format version (allows independent evolution).
flags: SectionFlagsSection flags (required, mmap-able).
offset: u64Byte offset from file start where section data begins.
length: u64Byte length of the section data.
checksum: u32CRC-32 checksum of the section data.
Implementations§
Trait Implementations§
Source§impl Clone for SectionDirectoryEntry
impl Clone for SectionDirectoryEntry
Source§fn clone(&self) -> SectionDirectoryEntry
fn clone(&self) -> SectionDirectoryEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionDirectoryEntry
impl Debug for SectionDirectoryEntry
Source§impl<'de> Deserialize<'de> for SectionDirectoryEntry
impl<'de> Deserialize<'de> for SectionDirectoryEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SectionDirectoryEntry
impl PartialEq for SectionDirectoryEntry
Source§impl Serialize for SectionDirectoryEntry
impl Serialize for SectionDirectoryEntry
impl Eq for SectionDirectoryEntry
impl StructuralPartialEq for SectionDirectoryEntry
Auto Trait Implementations§
impl Freeze for SectionDirectoryEntry
impl RefUnwindSafe for SectionDirectoryEntry
impl Send for SectionDirectoryEntry
impl Sync for SectionDirectoryEntry
impl Unpin for SectionDirectoryEntry
impl UnsafeUnpin for SectionDirectoryEntry
impl UnwindSafe for SectionDirectoryEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.