[][src]Struct sstable::Table

pub struct Table { /* fields omitted */ }

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]

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

impl Clone for Table[src]

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]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]