pub struct Header06 {Show 22 fields
pub flags: u8,
pub content_hash: [u8; 16],
pub file_len: u64,
pub root_len: u32,
pub card_region_len: u32,
pub data_offset: u64,
pub quad_count: u64,
pub term_count: u64,
pub graph_count: u64,
pub perm_mask: u8,
pub dict_codec: u8,
pub block_codec: u8,
pub internal_codec: u8,
pub pyramid_levels: u16,
pub id_widths: u8,
pub presence: u16,
pub card_off: u32,
pub card_len: u32,
pub card_digest: [u8; 16],
pub build_off: u32,
pub build_len: u32,
pub root_digest: [u8; 16],
}Expand description
The parsed 128-byte header.
Fields§
§flags: u8§content_hash: [u8; 16]§file_len: u64§root_len: u32§card_region_len: u32§data_offset: u64§quad_count: u64§term_count: u64§graph_count: u64§perm_mask: u8§dict_codec: u8§block_codec: u8§internal_codec: u8§pyramid_levels: u16§id_widths: u8Per-position term-id widths, 2 bits each (subjects, objects, predicates, graphs from the low bits): 0 = u32, 1 = u64 (refused by this reader).
presence: u16§card_off: u32§card_len: u32§card_digest: [u8; 16]§build_off: u32§build_len: u32§root_digest: [u8; 16]Implementations§
Source§impl Header06
impl Header06
Sourcepub fn from_bytes(b: &[u8]) -> Result<Header06, FileError>
pub fn from_bytes(b: &[u8]) -> Result<Header06, FileError>
Parse and bounds-check the fixed 128 bytes. Every field is untrusted.
Sourcepub fn root_offset(&self) -> u64
pub fn root_offset(&self) -> u64
Absolute offset of the root block.
Sourcepub fn card_region_offset(&self) -> u64
pub fn card_region_offset(&self) -> u64
Absolute offset of the card region.
Sourcepub fn front_base(&self) -> u64
pub fn front_base(&self) -> u64
Absolute offset where the front sections start (after the card region).
Sourcepub fn card_range(&self) -> ByteRange
pub fn card_range(&self) -> ByteRange
The stored card’s absolute range (len == 0: no card).
Sourcepub fn build_range(&self) -> ByteRange
pub fn build_range(&self) -> ByteRange
The build record’s absolute range (len == 0: none).
Trait Implementations§
impl Eq for Header06
impl StructuralPartialEq for Header06
Auto Trait Implementations§
impl Freeze for Header06
impl RefUnwindSafe for Header06
impl Send for Header06
impl Sync for Header06
impl Unpin for Header06
impl UnsafeUnpin for Header06
impl UnwindSafe for Header06
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