pub struct BinaryIndex {
pub version: u32,
pub file_hash: u64,
pub file_path: PathBuf,
pub header: FileHeader,
pub string_table: StringTableIndex,
pub allocations: CompactAllocationIndex,
pub advanced_metrics: Option<AdvancedMetricsIndex>,
pub created_at: SystemTime,
pub file_size: u64,
}
Expand description
Main binary file index containing all metadata needed for fast access
Fields§
§version: u32
Version of the index format for compatibility
file_hash: u64
Hash of the binary file content for cache validation
file_path: PathBuf
Path to the original binary file
header: FileHeader
File header information
string_table: StringTableIndex
String table index information
allocations: CompactAllocationIndex
Compressed allocation records index
advanced_metrics: Option<AdvancedMetricsIndex>
Advanced metrics segment information (optional)
created_at: SystemTime
When this index was created
file_size: u64
Size of the original binary file
Implementations§
Source§impl BinaryIndex
impl BinaryIndex
Sourcepub const INDEX_VERSION: u32 = 1u32
pub const INDEX_VERSION: u32 = 1u32
Current index format version
Sourcepub fn new(
file_path: PathBuf,
file_hash: u64,
file_size: u64,
header: FileHeader,
) -> Self
pub fn new( file_path: PathBuf, file_hash: u64, file_size: u64, header: FileHeader, ) -> Self
Create a new binary index
Sourcepub fn is_valid_for_file(&self, file_path: &Path, file_hash: u64) -> bool
pub fn is_valid_for_file(&self, file_path: &Path, file_hash: u64) -> bool
Check if this index is valid for the given file
Sourcepub fn record_count(&self) -> u32
pub fn record_count(&self) -> u32
Get the number of allocation records
Sourcepub fn get_record_offset(&self, record_index: usize) -> Option<u64>
pub fn get_record_offset(&self, record_index: usize) -> Option<u64>
Get the file offset for a specific record index
Sourcepub fn get_record_size(&self, record_index: usize) -> Option<u16>
pub fn get_record_size(&self, record_index: usize) -> Option<u16>
Get the record size for a specific record index
Sourcepub fn has_quick_filter_data(&self) -> bool
pub fn has_quick_filter_data(&self) -> bool
Check if quick filtering data is available
Trait Implementations§
Source§impl Clone for BinaryIndex
impl Clone for BinaryIndex
Source§fn clone(&self) -> BinaryIndex
fn clone(&self) -> BinaryIndex
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 BinaryIndex
impl Debug for BinaryIndex
Source§impl<'de> Deserialize<'de> for BinaryIndex
impl<'de> Deserialize<'de> for BinaryIndex
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
Auto Trait Implementations§
impl Freeze for BinaryIndex
impl RefUnwindSafe for BinaryIndex
impl Send for BinaryIndex
impl Sync for BinaryIndex
impl Unpin for BinaryIndex
impl UnwindSafe for BinaryIndex
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more