pub struct MetaFile { /* private fields */ }Implementations§
Source§impl MetaFile
impl MetaFile
Sourcepub fn open(db_path: &Path, sequence_number: u32) -> Result<Self>
pub fn open(db_path: &Path, sequence_number: u32) -> Result<Self>
Opens a meta file at the given path. This memory maps the file, but does not read it yet. It’s lazy read on demand.
pub fn clear_cache(&mut self)
pub fn prepare_sst_cache(&self)
pub fn sequence_number(&self) -> u32
pub fn family(&self) -> u32
pub fn entries(&self) -> &[MetaEntry]
pub fn entry(&self, index: u32) -> &MetaEntry
pub fn amqf_data(&self) -> &[u8] ⓘ
pub fn deserialize_used_key_hashes_amqf(&self) -> Result<Option<Filter>>
pub fn retain_entries(&mut self, predicate: impl FnMut(u32) -> bool) -> bool
pub fn obsolete_entries(&self) -> &[u32]
pub fn has_active_entries(&self) -> bool
pub fn obsolete_sst_files(&self) -> &[u32]
Sourcepub fn lookup<K: QueryKey, const FIND_ALL: bool>(
&self,
key_family: u32,
key_hash: u64,
key: &K,
key_block_cache: &BlockCache,
value_block_cache: &BlockCache,
) -> Result<MetaLookupResult>
pub fn lookup<K: QueryKey, const FIND_ALL: bool>( &self, key_family: u32, key_hash: u64, key: &K, key_block_cache: &BlockCache, value_block_cache: &BlockCache, ) -> Result<MetaLookupResult>
Looks up a key in this meta file.
If FIND_ALL is false, returns after finding the first match.
If FIND_ALL is true, returns all entries with the same key from all SST files
(useful for keyspaces where keys are hashes and collisions are possible).
pub fn batch_lookup<K: QueryKey>( &self, key_family: u32, keys: &[K], cells: &mut [(u64, usize, Option<LookupValue>)], empty_cells: &mut usize, key_block_cache: &BlockCache, value_block_cache: &BlockCache, ) -> Result<MetaBatchLookupResult>
Auto Trait Implementations§
impl Freeze for MetaFile
impl RefUnwindSafe for MetaFile
impl Send for MetaFile
impl Sync for MetaFile
impl Unpin for MetaFile
impl UnsafeUnpin for MetaFile
impl UnwindSafe for MetaFile
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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 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>
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