[−][src]Struct sstb::sstable::reader::MmapUncompressedSSTableReader
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]
filename: P,
opts: &ReadOptions
) -> Result<Self>
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]
&'a self,
key: &[u8],
options: Option<GetOptions>
) -> Result<Option<&'a [u8]>>
Get a key from the sstable with options.
Auto Trait Implementations
impl RefUnwindSafe for MmapUncompressedSSTableReader
impl Send for MmapUncompressedSSTableReader
impl Sync for MmapUncompressedSSTableReader
impl Unpin for MmapUncompressedSSTableReader
impl UnwindSafe for MmapUncompressedSSTableReader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,