Struct tetsy_kvdb::DBTransaction[][src]

pub struct DBTransaction {
    pub ops: Vec<DBOp>,
}

Write transaction. Batches a sequence of put/delete operations for efficiency.

Fields

ops: Vec<DBOp>

Database operations.

Implementations

impl DBTransaction[src]

pub fn new() -> DBTransaction[src]

Create new transaction.

pub fn with_capacity(cap: usize) -> DBTransaction[src]

Create new transaction with capacity.

pub fn put(&mut self, col: u32, key: &[u8], value: &[u8])[src]

Insert a key-value pair in the transaction. Any existing value will be overwritten upon write.

pub fn put_vec(&mut self, col: u32, key: &[u8], value: Bytes)[src]

Insert a key-value pair in the transaction. Any existing value will be overwritten upon write.

pub fn delete(&mut self, col: u32, key: &[u8])[src]

Delete value by key.

Trait Implementations

impl Clone for DBTransaction[src]

impl Default for DBTransaction[src]

impl PartialEq<DBTransaction> for DBTransaction[src]

impl StructuralPartialEq for DBTransaction[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.