Trait engine_traits::WriteBatchExt[][src]

pub trait WriteBatchExt: Sized {
    type WriteBatch: WriteBatch<Self>;
    type WriteBatchVec: WriteBatch<Self>;

    const WRITE_BATCH_MAX_KEYS: usize;

    fn support_write_batch_vec(&self) -> bool;
fn write_batch(&self) -> Self::WriteBatch;
fn write_batch_with_cap(&self, cap: usize) -> Self::WriteBatch; }

Engines that can create write batches

Associated Types

type WriteBatch: WriteBatch<Self>[src]

type WriteBatchVec: WriteBatch<Self>[src]

WriteBatchVec is used for multi_batch_write of RocksEngine and other Engine could also implement another kind of WriteBatch according to their needs.

Loading content...

Associated Constants

const WRITE_BATCH_MAX_KEYS: usize[src]

The number of puts/deletes made to a write batch before the batch should be committed with write. More entries than this will cause should_write_to_engine to return true.

In practice it seems that exceeding this number of entries is possible and does not result in an error. It isn’t clear the consequence of exceeding this limit.

Loading content...

Required methods

fn support_write_batch_vec(&self) -> bool[src]

Indicates whether the WriteBatchVec type can be created and works as expected.

If this returns false then creating a WriteBatchVec will panic.

fn write_batch(&self) -> Self::WriteBatch[src]

fn write_batch_with_cap(&self, cap: usize) -> Self::WriteBatch[src]

Loading content...

Implementors

Loading content...