[−][src]Struct sstable::Table
Table
is used for accessing SSTables.
Methods
impl Table
[src]
pub fn new_from_file(opt: Options, path: &Path) -> Result<Table>
[src]
Creates a new table reader from a file at path
.
pub fn new(
opt: Options,
file: Box<dyn RandomAccess>,
size: usize
) -> Result<Table>
[src]
opt: Options,
file: Box<dyn RandomAccess>,
size: usize
) -> Result<Table>
Creates a new table reader.
pub fn approx_offset_of(&self, key: &[u8]) -> usize
[src]
Returns the offset of the block that contains key
.
pub fn iter(&self) -> TableIterator
[src]
Returns an iterator over an SSTable. Iterators hold internal references to the table, so make sure to let them expire when not needed anymore.
pub fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
[src]
Retrieve an entry for a key from the table. This function uses the attached filters, so is better suited if you frequently look for non-existing values (as it will detect the non-existence of an entry in a block without having to load the block).
Trait Implementations
Auto Trait Implementations
impl !Send for Table
impl !Sync for Table
impl Unpin for Table
impl !UnwindSafe for Table
impl !RefUnwindSafe for Table
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,