[−][src]Struct rocks::sst_file_writer::SstFileWriter
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
impl RefUnwindSafe for SstFileWriter
[src]
impl !Send for SstFileWriter
[src]
impl !Sync for SstFileWriter
[src]
impl Unpin for SstFileWriter
[src]
impl UnwindSafe for SstFileWriter
[src]
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>,