Struct ckb_db::write_batch::RocksDBWriteBatch[][src]

pub struct RocksDBWriteBatch { /* fields omitted */ }
Expand description

An atomic batch of write operations.

Making an atomic commit of several write operations.

Implementations

impl RocksDBWriteBatch[src]

pub fn len(&self) -> usize[src]

Return the count of write batch.

pub fn size_in_bytes(&self) -> usize[src]

Return WriteBatch serialized size (in bytes).

pub fn is_empty(&self) -> bool[src]

Returns true if the write batch contains no operations.

pub fn put(&mut self, col: Col, key: &[u8], value: &[u8]) -> Result<()>[src]

Write the bytes into the given column with associated key.

pub fn delete(&mut self, col: Col, key: &[u8]) -> Result<()>[src]

Delete the data associated with the given key and given column.

pub fn delete_range(&mut self, col: Col, from: &[u8], to: &[u8]) -> Result<()>[src]

Remove database entries from start key to end key.

Removes the database entries in the range [“begin_key”, “end_key”), i.e., including “begin_key” and excluding “end_key”. It is not an error if no keys exist in the range [“begin_key”, “end_key”).

pub fn clear(&mut self) -> Result<()>[src]

Clear all updates buffered in this batch.

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> AsAny for T where
    T: Any

pub fn as_any(&self) -> &(dyn Any + 'static)

TODO(doc): @quake

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V