pub struct LabelIndexSignal {
pub present: bool,
pub bytes: u64,
pub entries: Option<u64>,
}Expand description
The file’s label-prefix-search affordance: does it carry a LABEL_INDEX section (kind 8), how many labels, and how large is it?
Measured at read time, never stored, for the reasons
TextIndexSignal gives: presence and size come free with the header,
and entries is the u64 at bytes 20..28 of the section’s fixed preamble —
one 32-byte range read, never the index. A file without the section may
still answer a prefix search from the legacy label block of its
pyramid-meta (at most 8,192 labels); that block is not measured here,
because reading it means fetching the whole pyramid-meta.
Fields§
§present: boolTrue iff the file has a kind-8 section. Always written, including as
false.
bytes: u64Byte length of the whole LABEL_INDEX section.
entries: Option<u64>Number of (subject, label) entries; None when there is no index or
its preamble was unreadable.
Implementations§
Source§impl LabelIndexSignal
impl LabelIndexSignal
Sourcepub fn probe<R>(reader: &R, header: &Header) -> LabelIndexSignalwhere
R: RangeReader + ?Sized,
pub fn probe<R>(reader: &R, header: &Header) -> LabelIndexSignalwhere
R: RangeReader + ?Sized,
Measure the signal from a file’s header, through the reader the card was read with: nothing beyond the header when there is no index, one 32-byte range read when there is.
Trait Implementations§
Source§impl Clone for LabelIndexSignal
impl Clone for LabelIndexSignal
Source§fn clone(&self) -> LabelIndexSignal
fn clone(&self) -> LabelIndexSignal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more