Skip to main content

WriteCursor

Trait WriteCursor 

Source
pub trait WriteCursor<'txn, T: Table>: ReadCursor<'txn, T> {
    // Required methods
    fn put(&mut self, key: &T::Key, value: &T::Value);
    fn append(&mut self, key: &T::Key, value: &T::Value);
    fn remove(&mut self);
}
Expand description

A cursor is used for navigating the entries within a table. The read-write version can also delete entries.

Closely follows libmdbx’s cursor API.

Required Methods§

Source

fn put(&mut self, key: &T::Key, value: &T::Value)

Puts a new entry into the database. The cursor will be positioned on the new entry.

Source

fn append(&mut self, key: &T::Key, value: &T::Value)

Appends a key/value pair to the end of the database. This operation fails if the key is less than the last key.

Source

fn remove(&mut self)

Removes the current entry from the database. For a DupTable, this removes the current duplicate value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'txn, T: Table> WriteCursor<'txn, T> for MdbxWriteCursor<'txn, T>