IndexWriter

Trait IndexWriter 

Source
pub trait IndexWriter {
    // Required methods
    fn insert_indirect(
        &mut self,
        key: &[u8],
        vhandle: ValueHandle,
        size: u32,
    ) -> Result<()>;
    fn finish(&mut 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_indirect( &mut self, key: &[u8], vhandle: ValueHandle, size: u32, ) -> Result<()>

Inserts a value handle into the index write batch.

§Errors

Will return Err if an IO error occurs.

Source

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

Finishes the write batch.

§Errors

Will return Err if an IO error occurs.

Implementors§