[][src]Function sanakirja::next

pub unsafe fn next<T: Transaction, K: Representable, V: Representable>(
    txn: &T,
    cursor: &mut Cursor
) -> Result<Option<(K, V)>, CRCError>

Return the current element, and then move the cursor forward by one step. This function is safe to use if (1) its cursor argument has been initialised and (2) its txn argument has not been mutated since that initialisation.

This function is used internally (in a safe way) in the implementation of DbIterator and RevDbIterator. It is public to be able to use Sanakirja as a generic backend, interchangeable with others, which can be difficult when iterators are needed, due to the lack of associated constructors (see Rust issue #44265).