pub struct FixedRegions {
pub search_stride: usize,
pub tail_start: usize,
pub tail_stride: usize,
/* private fields */
}Expand description
Where the two regions of a fixed-size key block sit, computed once per block.
A fixed block stores the bytes the binary search probes in a dense leading region and everything else in a trailing region at the same entry index, so a probe touches one small stride rather than a full interleaved entry.
This is the single owner of that geometry: the reader, the writer, and sst_inspect all derive
their offsets from here, so a change to which bytes go in the search region is made once. It is
the fixed-block counterpart to key_block_table_stride for variable-size blocks.
Fields§
§search_stride: usizeBytes per entry in the search region.
tail_start: usizeOffset of the tail region, relative to the start of the entry data.
tail_stride: usizeBytes per entry in the tail region.
Implementations§
Source§impl FixedRegions
impl FixedRegions
Sourcepub fn new(
entry_count: usize,
layout: KeyBlockLayout,
key_size: usize,
val_size: usize,
) -> Self
pub fn new( entry_count: usize, layout: KeyBlockLayout, key_size: usize, val_size: usize, ) -> Self
val_size is the tail’s per-entry value footprint: the value bytes plus the per-entry type
byte of a mixed-type block. [fixed_value_layout] already folds that byte in; a caller
computing it from a block header must add it itself.
Sourcepub fn tail_key_size(&self) -> usize
pub fn tail_key_size(&self) -> usize
Bytes of a tail entry that precede its value: the key for HashThenKey, nothing for
KeyOnly, which keeps its key in the search region.
Trait Implementations§
Source§impl Clone for FixedRegions
impl Clone for FixedRegions
Source§fn clone(&self) -> FixedRegions
fn clone(&self) -> FixedRegions
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 FixedRegions
Auto Trait Implementations§
impl Freeze for FixedRegions
impl RefUnwindSafe for FixedRegions
impl Send for FixedRegions
impl Sync for FixedRegions
impl Unpin for FixedRegions
impl UnsafeUnpin for FixedRegions
impl UnwindSafe for FixedRegions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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