pub trait AssocCursor<'txn> {
// Required method
fn assoc_cursor<'db>(
&self,
cursor: StaleCursor<'db>,
) -> Result<Cursor<'txn, 'db>>;
}Expand description
Types of transaction references which can be used to renew StaleCursors
into functional Cursors.
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 Cursors 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§
Sourcefn 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.