Trait sst::Builder

source ·
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§

source

type Sealed

The type that gets returned from seal.

Required Methods§

source

fn approximate_size(&self) -> usize

The approximate size of the builder.

source

fn put(&mut self, key: &[u8], timestamp: u64, value: &[u8]) -> Result<(), Error>

Put a key into the builder.

source

fn del(&mut self, key: &[u8], timestamp: u64) -> Result<(), Error>

Put a tombstone into the builder.

source

fn seal(self) -> Result<Self::Sealed, Error>

Seal the builder to stop further writes and return the Sealed type.

Implementors§