Struct rocksdb::SstFileWriter
source · [−]pub struct SstFileWriter<'a> { /* private fields */ }
Expand description
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
sourceimpl<'a> SstFileWriter<'a>
impl<'a> SstFileWriter<'a>
sourcepub fn open<P: AsRef<Path>>(&'a self, path: P) -> Result<(), Error>
pub fn open<P: AsRef<Path>>(&'a self, path: P) -> Result<(), Error>
Prepare SstFileWriter to write into file located at “file_path”.
sourcepub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error> where
K: AsRef<[u8]>,
V: AsRef<[u8]>,
pub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error> where
K: AsRef<[u8]>,
V: AsRef<[u8]>,
Adds a Put key with value to currently opened file REQUIRES: key is after any previously added key according to comparator.
Trait Implementations
sourceimpl<'a> Drop for SstFileWriter<'a>
impl<'a> Drop for SstFileWriter<'a>
impl<'a> Send for SstFileWriter<'a>
impl<'a> Sync for SstFileWriter<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for SstFileWriter<'a>
impl<'a> Unpin for SstFileWriter<'a>
impl<'a> UnwindSafe for SstFileWriter<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more