#[repr(u8)]pub enum RecordKind {
String = 0,
CollectionChunk = 1,
Document = 2,
Vector = 3,
GraphNode = 4,
GraphAdj = 5,
Checkpoint = 6,
Tombstone = 7,
IndexDelta = 8,
}Expand description
What a record holds. 06 section 2.1.
This is deliberately not the type a reader gets back. A version one reader
must skip a kind it has never heard of rather than refuse the file (07
section 9), so RecordRef keeps the raw byte and offers this as a
question.
Variants§
String = 0
A plain string value.
CollectionChunk = 1
One chunk of a collection, or of a value too large for a page.
Document = 2
A document, whose value is the YOJB value byte for byte. See
crate::document.
Vector = 3
A vector. See crate::vector.
GraphNode = 4
A graph node.
GraphAdj = 5
A graph adjacency run.
Checkpoint = 6
A checkpoint marker.
Tombstone = 7
A deletion.
IndexDelta = 8
An index change that replay applies directly instead of reinserting.
Implementations§
Source§impl RecordKind
impl RecordKind
Sourcepub const ALL: [RecordKind; 9]
pub const ALL: [RecordKind; 9]
Every kind this version knows, in order.
Sourcepub const fn from_u8(b: u8) -> Option<RecordKind>
pub const fn from_u8(b: u8) -> Option<RecordKind>
The kind for a byte, or None if this version has not heard of it.
Sourcepub const fn carries_a_key(self) -> bool
pub const fn carries_a_key(self) -> bool
Whether a record of this kind carries a key.
Chunks do not: they are addressed by the header record that lists them, and repeating the key in every chunk of a large collection would be the dominant cost of storing it.
Trait Implementations§
Source§impl Clone for RecordKind
impl Clone for RecordKind
Source§fn clone(&self) -> RecordKind
fn clone(&self) -> RecordKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more