Trait ord_lmdb_zero::traits::AssocCursor
source · [−]pub trait AssocCursor<'txn> {
fn assoc_cursor<'db>(
&self,
cursor: StaleCursor<'db>
) -> Result<Cursor<'txn, 'db>>;
}
Expand description
Types of transaction references which can be used to renew StaleCursor
s
into functional Cursor
s.
In most cases this is simply used as an extension trait (see the examples
on Cursor
). However, it can also be used to abstract over things that can
be used to create Cursor
s if so desired.
Implementations are provided for normal references to ReadTransaction
as
well as Rc
and Arc
. The latter two require the transaction’s inner
lifetime to be 'static
.
Required methods
fn assoc_cursor<'db>(
&self,
cursor: StaleCursor<'db>
) -> Result<Cursor<'txn, 'db>>
fn assoc_cursor<'db>(
&self,
cursor: StaleCursor<'db>
) -> Result<Cursor<'txn, 'db>>
Associates a saved read-only with this transaction.
The cursor will be rebound to this transaction, but will continue using the same database that it was previously.