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 moreimpl Copy for LabelIndexSignal
Source§impl Debug for LabelIndexSignal
impl Debug for LabelIndexSignal
Source§impl Default for LabelIndexSignal
impl Default for LabelIndexSignal
Source§fn default() -> LabelIndexSignal
fn default() -> LabelIndexSignal
Source§impl<'de> Deserialize<'de> for LabelIndexSignal
impl<'de> Deserialize<'de> for LabelIndexSignal
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LabelIndexSignal, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LabelIndexSignal, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for LabelIndexSignal
Source§impl PartialEq for LabelIndexSignal
impl PartialEq for LabelIndexSignal
Source§impl Serialize for LabelIndexSignal
impl Serialize for LabelIndexSignal
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for LabelIndexSignal
Auto Trait Implementations§
impl Forget for LabelIndexSignal
impl Freeze for LabelIndexSignal
impl Move for LabelIndexSignal
impl RefUnwindSafe for LabelIndexSignal
impl Send for LabelIndexSignal
impl Sync for LabelIndexSignal
impl Unpin for LabelIndexSignal
impl UnsafeUnpin for LabelIndexSignal
impl UnwindSafe for LabelIndexSignal
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.