Skip to main content

V06File

Struct V06File 

Source
pub struct V06File {
    pub h: Header06,
    pub root: Root06,
    pub reader: Arc<dyn RangeReader + Sync + Send>,
}
Expand description

An open 0x06 file: its header and root, and the reader.

Fields§

§h: Header06

The 128-byte header.

§root: Root06

The decoded root block.

§reader: Arc<dyn RangeReader + Sync + Send>

Where everything else is read from.

Implementations§

Source§

impl V06File

Source

pub fn open( reader: Arc<dyn RangeReader + Sync + Send>, first: &[u8], ) -> Result<V06File, FileError>

Open from first, the file’s leading bytes (at least the header; the root is read from it when it fits, else fetched).

Source

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.

Source

pub fn section(&self, k: u8) -> Option<ByteRange>

The absolute range of section k, if present.

Source

pub fn fetch( &self, ) -> Arc<dyn Fn(&[(u64, u64)]) -> Option<Vec<Vec<u8>>> + Sync + Send> ⓘ

A batched leaf fetcher over this file’s reader (leaves are stored with the internal codec; decoding happens in the directory types).

Source

pub fn card(&self) -> Result<Option<Vec<u8>>, FileError>

The Dataset Card (decompressed), if the file has one.

Source

pub fn build_record(&self) -> Result<Option<Vec<u8>>, FileError>

The build record (raw), if the file has one.

Source

pub fn schema_section_bytes(&self) -> Option<Vec<u8>>

The stats + schema section, as the 0x05 SCHEMA section bytes (digest-prefixed) its decoder takes.

Source

pub fn schema(&self) -> Option<SchemaMeta>

The decoded stats + schema section.

Source

pub fn pyramid_bytes(&self) -> Option<Vec<u8>>

The community pyramid’s bytes.

Source

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).

Source

pub fn index(&self, read_concurrency: usize) -> Result<GraphIndex, FileError>

The default graph’s index, two-level, tiles faulted on demand.

Source

pub fn text_index(&self) -> Option<Result<TextIndex, FileError>>

The text index (leafed token table), if the file has one.

Source

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.

Source

pub fn label_index(&self) -> Option<Result<LabelIndex, FileError>>

The label index, if the file has one.

Source

pub fn label_entry_count(&self) -> Option<u64>

The label index’s entry count, from the root alone.

Source

pub fn quad_root(&self) -> Option<Result<QuadRoot, FileError>>

The quad index’s root, if the file has named graphs.

Source

pub fn verify(&self, only: Option<u8>) -> Result<bool, FileError>

Verify every digest: the root, the card, each section (streamed), and the content hash. only restricts the section checks to one kind. Ok(false) names nothing; verify_report does.

Source

pub fn verify_report(&self, only: Option<u8>) -> Result<Vec<String>, FileError>

Like verify, returning what failed (empty = all good).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V