pub struct V06File {
pub h: Header06,
pub root: Root06,
pub reader: Arc<dyn RangeReader + Send + Sync>,
}Expand description
An open 0x06 file: its header and root, and the reader.
Fields§
§h: Header06The 128-byte header.
root: Root06The decoded root block.
reader: Arc<dyn RangeReader + Send + Sync>Where everything else is read from.
Implementations§
Source§impl V06File
impl V06File
Sourcepub fn open(
reader: Arc<dyn RangeReader + Send + Sync>,
first: &[u8],
) -> Result<Self, FileError>
pub fn open( reader: Arc<dyn RangeReader + Send + Sync>, first: &[u8], ) -> Result<Self, FileError>
Open from first, the file’s leading bytes (at least the header; the
root is read from it when it fits, else fetched).
Sourcepub fn bound(&self, k: u8) -> u64
pub fn bound(&self, k: u8) -> u64
The decompression bound of section k’s blocks: its recorded largest
block, or BLOCK_CEILING where none is recorded.
Sourcepub fn fetch(&self) -> LeafFetch
pub fn fetch(&self) -> LeafFetch
A batched leaf fetcher over this file’s reader (leaves are stored with the internal codec; decoding happens in the directory types).
Sourcepub fn card(&self) -> Result<Option<Vec<u8>>, FileError>
pub fn card(&self) -> Result<Option<Vec<u8>>, FileError>
The Dataset Card (decompressed), if the file has one.
Sourcepub fn build_record(&self) -> Result<Option<Vec<u8>>, FileError>
pub fn build_record(&self) -> Result<Option<Vec<u8>>, FileError>
The build record (raw), if the file has one.
Sourcepub fn schema_section_bytes(&self) -> Option<Vec<u8>>
pub fn schema_section_bytes(&self) -> Option<Vec<u8>>
The stats + schema section, as the 0x05 SCHEMA section bytes
(digest-prefixed) its decoder takes.
Sourcepub fn schema(&self) -> Option<SchemaMeta>
pub fn schema(&self) -> Option<SchemaMeta>
The decoded stats + schema section.
Sourcepub fn pyramid_bytes(&self) -> Option<Vec<u8>>
pub fn pyramid_bytes(&self) -> Option<Vec<u8>>
The community pyramid’s bytes.
Sourcepub fn dictionary(&self, want: [bool; 4]) -> Result<Dictionary, FileError>
pub fn dictionary(&self, want: [bool; 4]) -> Result<Dictionary, FileError>
The four dictionary sections, two-level, chunks faulted on demand.
want[si] == false leaves that section empty (a search-only open).
Sourcepub fn index(&self, read_concurrency: usize) -> Result<GraphIndex, FileError>
pub fn index(&self, read_concurrency: usize) -> Result<GraphIndex, FileError>
The default graph’s index, two-level, tiles faulted on demand.
Sourcepub fn text_index(&self) -> Option<Result<TextIndex, FileError>>
pub fn text_index(&self) -> Option<Result<TextIndex, FileError>>
The text index (leafed token table), if the file has one.
Sourcepub fn token_table_bytes(&self) -> Option<u64>
pub fn token_table_bytes(&self) -> Option<u64>
Stored bytes of the token table (all leaves) — what a substring search would read; a word lookup reads one leaf.
Sourcepub fn label_index(&self) -> Option<Result<LabelIndex, FileError>>
pub fn label_index(&self) -> Option<Result<LabelIndex, FileError>>
The label index, if the file has one.
Sourcepub fn label_entry_count(&self) -> Option<u64>
pub fn label_entry_count(&self) -> Option<u64>
The label index’s entry count, from the root alone.
Sourcepub fn quad_root(&self) -> Option<Result<QuadRoot, FileError>>
pub fn quad_root(&self) -> Option<Result<QuadRoot, FileError>>
The quad index’s root, if the file has named graphs.
Auto Trait Implementations§
impl !RefUnwindSafe for V06File
impl !UnwindSafe for V06File
impl Freeze for V06File
impl Send for V06File
impl Sync for V06File
impl Unpin for V06File
impl UnsafeUnpin for V06File
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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