Struct rocksdb::SstFileWriter [−][src]
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]
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.
pub fn merge<K, V>(&mut self, key: K, value: V) -> Result<(), Error> where
K: AsRef<[u8]>,
V: AsRef<[u8]>,
[src]
K: AsRef<[u8]>,
V: AsRef<[u8]>,
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]
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,
pub 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.
pub 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>,