pub struct FileMetadata {
pub file_number: u64,
pub file_size: u64,
pub smallest_key: Vec<u8>,
pub largest_key: Vec<u8>,
pub num_entries: u64,
pub min_seqno: u64,
pub max_seqno: u64,
pub path: PathBuf,
pub bloom_filter: Option<Arc<BloomFilterHandle>>,
pub being_compacted: bool,
}Expand description
Metadata for an SSTable file
Fields§
§file_number: u64Unique file number
file_size: u64File size in bytes
smallest_key: Vec<u8>Smallest key in file (for range queries)
largest_key: Vec<u8>Largest key in file (for range queries)
num_entries: u64Number of entries in file
min_seqno: u64Minimum sequence number in file
max_seqno: u64Maximum sequence number in file
path: PathBufPath to the file
bloom_filter: Option<Arc<BloomFilterHandle>>Bloom filter (if loaded)
being_compacted: boolWhether file is being compacted
Implementations§
Source§impl FileMetadata
impl FileMetadata
Sourcepub fn may_contain(&self, key: &[u8]) -> bool
pub fn may_contain(&self, key: &[u8]) -> bool
Check if key might be in this file using bloom filter
Sourcepub fn overlaps_range(&self, start: &[u8], end: &[u8]) -> bool
pub fn overlaps_range(&self, start: &[u8], end: &[u8]) -> bool
Check if a key range overlaps with this file
Trait Implementations§
Source§impl Clone for FileMetadata
impl Clone for FileMetadata
Source§fn clone(&self) -> FileMetadata
fn clone(&self) -> FileMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileMetadata
impl RefUnwindSafe for FileMetadata
impl Send for FileMetadata
impl Sync for FileMetadata
impl Unpin for FileMetadata
impl UnsafeUnpin for FileMetadata
impl UnwindSafe for FileMetadata
Blanket Implementations§
impl<T> Allocation for T
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<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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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