pub trait Builder {
type Sealed;
// Required methods
fn approximate_size(&self) -> usize;
fn put(
&mut self,
key: &[u8],
timestamp: u64,
value: &[u8]
) -> Result<(), Error>;
fn del(&mut self, key: &[u8], timestamp: u64) -> Result<(), Error>;
fn seal(self) -> Result<Self::Sealed, Error>;
}
Expand description
A Builder is a generic way of building a sorted (sst) or unsorted (log) string table.
Required Associated Types§
Required Methods§
sourcefn approximate_size(&self) -> usize
fn approximate_size(&self) -> usize
The approximate size of the builder.
sourcefn put(&mut self, key: &[u8], timestamp: u64, value: &[u8]) -> Result<(), Error>
fn put(&mut self, key: &[u8], timestamp: u64, value: &[u8]) -> Result<(), Error>
Put a key into the builder.