[][src]Struct rocks::sst_file_writer::SstFileWriter

pub struct SstFileWriter { /* fields omitted */ }

SstFileWriter is used to create sst files that can be added to database later. All keys in files generated by SstFileWriter will have sequence number = 0

Implementations

impl SstFileWriter[src]

pub fn builder() -> SstFileWriterBuilder[src]

pub fn open<P: AsRef<Path>>(&self, file_path: P) -> Result<()>[src]

Prepare SstFileWriter to write into file located at "file_path".

pub fn put(&self, key: &[u8], value: &[u8]) -> Result<()>[src]

Add a Put key with value to currently opened file

REQUIRES: key is after any previously added key according to comparator.

pub fn merge(&self, key: &[u8], value: &[u8]) -> Result<()>[src]

Add a Merge key with value to currently opened file

REQUIRES: key is after any previously added key according to comparator.

pub fn delete(&self, key: &[u8]) -> Result<()>[src]

Add a deletion key to currently opened file

REQUIRES: key is after any previously added key according to comparator.

pub fn finish(&self) -> Result<ExternalSstFileInfo>[src]

Finalize writing to sst file and close file.

An optional ExternalSstFileInfo pointer can be passed to the function which will be populated with information about the created sst file

pub fn file_size(&self) -> u64[src]

Return the current file size.

Trait Implementations

impl Drop for SstFileWriter[src]

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.