pub struct TxnRw<'a> { /* private fields */ }
Expand description

Read-write transaction

The methods for read-only access to the database are accessible through the Txn trait (which is implemented by TxnRo and TxnRw). Methods for write access, however, are available directly on the TxnRw struct.

Read-write transactions are aborted when dropped. To make changes permanent, TxnRw::commit must be called.

handles can be simply dropped when not needed anymore.

Read-write transactions are neither Send nor Sync.

Implementations

Commit transaction

Abort transaction (same as drop)

Put value into database

Put value into database unless key exists

Put value into database unless key-value pair exists

Delete all values from database that match a given key

Delete key-value pair from database

Delete key-value pair at current cursor position

Delete all values with same key at current cursor position

Trait Implementations

Formats the value using the given formatter. Read more

Get reference to value in database

Create a new cursor

Get number of values for current cursor position

Set cursor to first entry in database

Set cursor to first entry in database and get pair

Set cursor to last entry in database

Set cursor to last entry in database and get pair

Get key at current cursor position

Get value at current cursor position

Get key-value pair at current cursor position

Set cursor to key

Set cursor to key and get value

Set cursor to key or next greater key if not existent and get pair

Move cursor to next entry in database and get pair

Move cursor to previous entry in database and get pair

Move cursor to first value of next key and get pair

Move cursor to last value of previous key and get pair

Move cursor to first value of current key

Move cursor to first value of current key and get value

Move cursor to last value of current key

Move cursor to last value of current key and get value

Set cursor to key-value pair

Set cursor to key-value pair

Move cursor to next value of current key and get value

Move cursor to next value of current key and get value

Get owned value from database

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.