Trait value_log::IndexWriter

source ·
pub trait IndexWriter {
    // Required methods
    fn insert_indirection(
        &mut self,
        key: &[u8],
        handle: ValueHandle,
        size: u32,
    ) -> Result<()>;
    fn finish(self) -> Result<()>;
}
Expand description

Trait that allows writing into an external index

The write process should be atomic meaning that until finish is called no written value handles should be handed out by the index. When finish fails, no value handles should be written into the index.

Required Methods§

source

fn insert_indirection( &mut self, key: &[u8], handle: ValueHandle, size: u32, ) -> Result<()>

Inserts a value handle into the write batch.

§Errors

Will return Err if an IO error occurs.

source

fn finish(self) -> Result<()>

Finishes the write batch.

§Errors

Will return Err if an IO error occurs.

Implementors§