[][src]Struct rusty_leveldb::WriteBatch

pub struct WriteBatch { /* fields omitted */ }

A WriteBatch contains entries to be written to a MemTable (for example) in a compact form.

The storage format is (with the respective length in bytes)

[tag: 1, keylen: ~var, key: keylen, vallen: ~var, val: vallen]

Methods

impl WriteBatch[src]

pub fn new() -> WriteBatch[src]

pub fn set_contents(&mut self, from: &[u8])[src]

Initializes a WriteBatch with a serialized WriteBatch.

pub fn put(&mut self, k: &[u8], v: &[u8])[src]

Adds an entry to a WriteBatch, to be added to the database.

pub fn delete(&mut self, k: &[u8])[src]

Marks an entry to be deleted from the database.

pub fn clear(&mut self)[src]

Clear the contents of a WriteBatch.

pub fn count(&self) -> u32[src]

Returns how many operations are in a batch.

pub fn sequence(&self) -> u64[src]

pub fn iter<'a>(&'a self) -> WriteBatchIter<'a>[src]

pub fn insert_into_memtable(&self, seq: u64, mt: &mut MemTable)[src]

pub fn encode(self, seq: u64) -> Vec<u8>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,