[][src]Struct sstb::sstable::reader::MmapUncompressedSSTableReader

pub struct MmapUncompressedSSTableReader { /* fields omitted */ }

A multi-threaded reader that only works with fully uncompressed data.

There is no locking happening inside, there is no internal mutability either. Everything just relies on the OS page cache to work, so if you are ok with storing uncompressed sstables, this reader the way to go.

If you try to use it with a compressed sstable it will return Error::CantUseCompressedFileWithMultiThreadedMmap

If you want to use this with multiple threads just put it into an Arc without Mutex'es.

Methods

impl MmapUncompressedSSTableReader[src]

pub fn new<P: AsRef<Path>>(filename: P) -> Result<Self>[src]

Construct a new mmap reader from a file with default options.

new_with_options has more details.

pub fn new_with_options<P: AsRef<Path>>(
    filename: P,
    opts: &ReadOptions
) -> Result<Self>
[src]

Construct a new mmap reader from a file.

All options except "use_bloom" are ignored.

Returns Error::CantUseCompressedFileWithMultiThreadedMmap if you try to open a compressed file with it.

pub fn get<'a>(&'a self, key: &[u8]) -> Result<Option<&'a [u8]>>[src]

pub fn get_with_options<'a>(
    &'a self,
    key: &[u8],
    options: Option<GetOptions>
) -> Result<Option<&'a [u8]>>
[src]

Get a key from the sstable with options.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,