pub struct SSTableWriter<'a, V: SSTableValue> { /* private fields */ }Expand description
SSTable writer with optimizations:
- Dictionary compression for blocks (if dictionary provided)
- Configurable compression level
- Block index prefix compression
- Bloom filter for fast negative lookups
Implementations§
Source§impl<'a, V: SSTableValue> SSTableWriter<'a, V>
impl<'a, V: SSTableValue> SSTableWriter<'a, V>
Sourcepub fn new(writer: &'a mut dyn Write) -> Self
pub fn new(writer: &'a mut dyn Write) -> Self
Create a new SSTable writer with default configuration
Sourcepub fn with_config(
writer: &'a mut dyn Write,
config: SSTableWriterConfig,
) -> Self
pub fn with_config( writer: &'a mut dyn Write, config: SSTableWriterConfig, ) -> Self
Create a new SSTable writer with custom configuration
Sourcepub fn with_dictionary(
writer: &'a mut dyn Write,
config: SSTableWriterConfig,
dictionary: CompressionDict,
) -> Self
pub fn with_dictionary( writer: &'a mut dyn Write, config: SSTableWriterConfig, dictionary: CompressionDict, ) -> Self
Create a new SSTable writer with a pre-trained dictionary
pub fn insert(&mut self, key: &[u8], value: &V) -> Result<()>
pub fn finish(self) -> Result<()>
Auto Trait Implementations§
impl<'a, V> Freeze for SSTableWriter<'a, V>
impl<'a, V> !RefUnwindSafe for SSTableWriter<'a, V>
impl<'a, V> !Send for SSTableWriter<'a, V>
impl<'a, V> !Sync for SSTableWriter<'a, V>
impl<'a, V> Unpin for SSTableWriter<'a, V>where
V: Unpin,
impl<'a, V> !UnwindSafe for SSTableWriter<'a, V>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more