Struct rocksdb::SstFileWriter[][src]

pub struct SstFileWriter<'a> { /* 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<'a> SstFileWriter<'a>[src]

pub fn create(opts: &'a Options) -> SstFileWriter<'_>[src]

Initializes SstFileWriter with given DB options.

pub fn open<P: AsRef<Path>>(&'a self, path: P) -> Result<(), Error>[src]

Prepare SstFileWriter to write into file located at “file_path”.

pub fn finish(&mut self) -> Result<(), Error>[src]

Finalize writing to sst file and close file.

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

returns the current file size

pub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error> where
    K: AsRef<[u8]>,
    V: AsRef<[u8]>, 
[src]

Adds a Put key with value to currently opened file REQUIRES: key is after any previously added key according to comparator.

pub fn merge<K, V>(&mut self, key: K, value: V) -> Result<(), Error> where
    K: AsRef<[u8]>,
    V: AsRef<[u8]>, 
[src]

Adds a Merge key with value to currently opened file REQUIRES: key is after any previously added key according to comparator.

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

Adds a deletion key to currently opened file REQUIRES: key is after any previously added key according to comparator.

Trait Implementations

impl<'a> Drop for SstFileWriter<'a>[src]

impl<'a> Send for SstFileWriter<'a>[src]

impl<'a> Sync for SstFileWriter<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SstFileWriter<'a>

impl<'a> Unpin for SstFileWriter<'a>

impl<'a> UnwindSafe for SstFileWriter<'a>

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.