pub struct SSTableBuilder { /* private fields */ }Expand description
SSTable builder
Implementations§
Source§impl SSTableBuilder
impl SSTableBuilder
Sourcepub fn new<P: AsRef<Path>>(
path: P,
options: SSTableBuilderOptions,
) -> Result<Self>
pub fn new<P: AsRef<Path>>( path: P, options: SSTableBuilderOptions, ) -> Result<Self>
Create a new SSTable builder
Sourcepub fn set_estimated_keys(&mut self, count: usize)
pub fn set_estimated_keys(&mut self, count: usize)
Set estimated number of keys (for filter sizing)
Sourcepub fn add(&mut self, key: &[u8], value: &[u8]) -> Result<()>
pub fn add(&mut self, key: &[u8], value: &[u8]) -> Result<()>
Add a key-value pair
Keys must be added in sorted order.
Sourcepub fn finish(self) -> Result<SSTableBuilderResult>
pub fn finish(self) -> Result<SSTableBuilderResult>
Finish building the SSTable
Sourcepub fn num_entries(&self) -> u64
pub fn num_entries(&self) -> u64
Get number of entries added
Auto Trait Implementations§
impl !RefUnwindSafe for SSTableBuilder
impl !Sync for SSTableBuilder
impl !UnwindSafe for SSTableBuilder
impl Freeze for SSTableBuilder
impl Send for SSTableBuilder
impl Unpin for SSTableBuilder
impl UnsafeUnpin for SSTableBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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