pub struct SummaryReader { /* private fields */ }Expand description
High-level Summary.db file reader
Implementations§
Source§impl SummaryReader
impl SummaryReader
Sourcepub async fn open(path: &Path, platform: Arc<Platform>) -> Result<Self>
pub async fn open(path: &Path, platform: Arc<Platform>) -> Result<Self>
Open and parse a Summary.db file
Sourcepub fn get_entries(&self) -> &[SummaryEntry]
pub fn get_entries(&self) -> &[SummaryEntry]
Get all summary entries
Sourcepub fn get_header(&self) -> &SummaryHeader
pub fn get_header(&self) -> &SummaryHeader
Get the header
Sourcepub fn get_first_key(&self) -> &[u8] ⓘ
pub fn get_first_key(&self) -> &[u8] ⓘ
Get the first partition key
Sourcepub fn get_last_key(&self) -> &[u8] ⓘ
pub fn get_last_key(&self) -> &[u8] ⓘ
Get the last partition key
Sourcepub fn find_entry_for_position(
&self,
target_position: u64,
) -> Option<&SummaryEntry>
pub fn find_entry_for_position( &self, target_position: u64, ) -> Option<&SummaryEntry>
Find the best summary entry for a given index position
Returns the entry with the largest position <= target position. This is useful for finding which summary entry covers a given position in the Index.db file.
Sourcepub fn get_entry_at(&self, index: usize) -> Option<&SummaryEntry>
pub fn get_entry_at(&self, index: usize) -> Option<&SummaryEntry>
Find the entry at a specific index
Sourcepub fn get_statistics(&self) -> SummaryStatistics
pub fn get_statistics(&self) -> SummaryStatistics
Get summary statistics
Sourcepub async fn validate_integrity(&self) -> Result<Vec<String>>
pub async fn validate_integrity(&self) -> Result<Vec<String>>
Validate summary integrity
Auto Trait Implementations§
impl Freeze for SummaryReader
impl RefUnwindSafe for SummaryReader
impl Send for SummaryReader
impl Sync for SummaryReader
impl Unpin for SummaryReader
impl UnsafeUnpin for SummaryReader
impl UnwindSafe for SummaryReader
Blanket Implementations§
impl<T> Allocation for T
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