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§
Source§impl<'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>
pub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
Adds a Put key with value to currently opened file REQUIRES: key is after any previously added key according to comparator.
Sourcepub fn put_with_ts<K, V, S>(
&mut self,
key: K,
ts: S,
value: V,
) -> Result<(), Error>
pub fn put_with_ts<K, V, S>( &mut self, key: K, ts: S, value: V, ) -> Result<(), Error>
Adds a Put key with value to currently opened file REQUIRES: key is after any previously added key according to comparator.
Sourcepub fn merge<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
pub fn merge<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
Adds a Merge key with value to currently opened file REQUIRES: key is after any previously added key according to comparator.
Trait Implementations§
Source§impl Drop for SstFileWriter<'_>
impl Drop for SstFileWriter<'_>
impl Send for SstFileWriter<'_>
impl Sync for SstFileWriter<'_>
Auto Trait Implementations§
impl<'a> Freeze for SstFileWriter<'a>
impl<'a> RefUnwindSafe for SstFileWriter<'a>
impl<'a> Unpin for SstFileWriter<'a>
impl<'a> UnwindSafe for SstFileWriter<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more