Skip to main content

BlockType

Enum BlockType 

Source
pub enum BlockType {
Show 13 variants Data, Index, Filter, Meta, RangeTombstone, Manifest, ManifestFooter, BlockLayout, Locator, SeqnoBounds, ZoneMap, Columnar, DeleteBitmap,
}
Expand description

The mutually-exclusive ROLE of a block within a table file.

BlockType answers “what is this block and which parser decodes its logical structure” — not “how was its payload post-processed”. Orthogonal, composable transform layers (compression, encryption, Reed-Solomon ECC, per-KV checksum footer) are NOT roles: they stack on top of a block of any role and are recorded in the block header’s block_flags bitfield, not here. A compressed, encrypted, per-KV-checked data block is still BlockType::Data with three transform bits set.

Variants§

§

Data

User key/value entries (the SST data payload).

§

Index

Block handles (offset/size/key/seqno) pointing at data blocks.

§

Filter

Bloom / Ribbon filter bit arrays.

§

Meta

Sorted key/value table properties (the SST metadata section).

§

RangeTombstone

Range tombstone entries, written as a separate block.

§

Manifest

One section of the Blocks-based manifest (e.g. tables, blob_files, format_version). Payload is the raw section bytes that the manifest writer puts there. All Block-level protections (XXH3, optional ECC, optional AEAD) apply, so the section gains bit-rot defence + (optional) encryption / recovery automatically.

§

ManifestFooter

Footer Block of the Blocks-based manifest. Payload carries manifest_layout_version, flags, section count, and the table of contents (TOC) for the surrounding Manifest section Blocks. Written last (primary read target) and mirrored at file offset 0 in a 4 KiB padded region for partial-write recovery.

§

BlockLayout

Optional per-table index of inner zstd-block layouts: for each data block that compressed into >= 2 inner zstd blocks, its file offset and the cumulative decompressed END offsets of those inner blocks. Lets a range query partial-decode only the inner blocks covering a key range. Absent unless the table has at least one such multi-inner-block block.

§

Locator

Optional per-table retrieval-ribbon locator section: maps each key to a packed (block_id, slot) for O(1) point reads. Present by default (block precision); absent when the level’s locator policy is disabled or the per-SST ribbon could not be built.

§

SeqnoBounds

Optional per-table seqno-bounds section: maps each data block’s file offset to its [seqno_min, seqno_max], powering the scan_since_seqno block-skip without bloating the index entries. Absent unless seqno_in_index is on.

§

ZoneMap

Optional per-table zone-map section: maps each data block’s file offset to per-column (min, max, null_count, row_count) statistics, letting a range / analytical scan skip a block whose stats prove no predicate match without decoding it. Kept parallel to the index (like Self::SeqnoBounds) so point reads never load it. Off by default; absent unless the zone-map policy is enabled.

§

Columnar

A PAX / rowgroup columnar block: a row-group laid out as per-column chunks rather than row-major key/value entries. Each chunk is a typed, codec-tagged opaque byte array plus a validity bitmap. Produced by the transpose on flush / major-compaction for a columnar tree / CF and read as a ColumnBatch. The wire tag is reserved unconditionally; the codec framework that fills these blocks is built only with the columnar feature.

§

DeleteBitmap

Optional per-table positional delete-bitmap section: marks, by row position, which rows of the table’s columnar segment are deleted. A pure membership set (MVCC reconciled at materialization via the compaction watermark), applied as a mask at scan time. Kept parallel to the data (like Self::ZoneMap) so a read without deletes pays nothing. Absent unless the segment has materialized deletes.

Trait Implementations§

Source§

impl Clone for BlockType

Source§

fn clone(&self) -> BlockType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BlockType

Source§

impl Debug for BlockType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BlockType

Source§

impl From<BlockType> for u8

Source§

fn from(val: BlockType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for BlockType

Source§

fn eq(&self, other: &BlockType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for BlockType

Source§

impl TryFrom<u8> for BlockType

Source§

type Error = Error

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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