pub struct SSTable { /* private fields */ }Expand description
SSTable reader for reading SSTable files
Implementations§
Source§impl SSTable
impl SSTable
Sourcepub fn open_with_cache<P: AsRef<Path>>(
path: P,
cache: Option<Arc<BlockCache>>,
) -> Result<Self>
pub fn open_with_cache<P: AsRef<Path>>( path: P, cache: Option<Arc<BlockCache>>, ) -> Result<Self>
Open an SSTable file with a block cache
Sourcepub fn get(&self, key: &[u8], options: &ReadOptions) -> Result<Option<Vec<u8>>>
pub fn get(&self, key: &[u8], options: &ReadOptions) -> Result<Option<Vec<u8>>>
Get a value by key
Sourcepub fn iter(&self) -> SSTableIterator<'_>
pub fn iter(&self) -> SSTableIterator<'_>
Create an iterator over all entries
Sourcepub fn range(
&self,
start: Option<&[u8]>,
end: Option<&[u8]>,
) -> RangeIterator<'_>
pub fn range( &self, start: Option<&[u8]>, end: Option<&[u8]>, ) -> RangeIterator<'_>
Create a range iterator
Sourcepub fn metadata(&self) -> &TableMetadata
pub fn metadata(&self) -> &TableMetadata
Get table metadata
Sourcepub fn num_blocks(&self) -> usize
pub fn num_blocks(&self) -> usize
Get number of data blocks
Sourcepub fn may_contain(&self, key: &[u8]) -> bool
pub fn may_contain(&self, key: &[u8]) -> bool
Check if key might exist (using filter)
Auto Trait Implementations§
impl !RefUnwindSafe for SSTable
impl !UnwindSafe for SSTable
impl Freeze for SSTable
impl Send for SSTable
impl Sync for SSTable
impl Unpin for SSTable
impl UnsafeUnpin for SSTable
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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