pub struct KeyCursor<'t, M, K> { /* private fields */ }
Expand description
Cursor on an object store or index
Implementations§
Source§impl<'t, M, K> KeyCursor<'t, M, K>
impl<'t, M, K> KeyCursor<'t, M, K>
Sourcepub fn direction(&self) -> Result<Option<CursorDirection>, Error>
pub fn direction(&self) -> Result<Option<CursorDirection>, Error>
Returns the direction of the cursor
Sourcepub fn key(&self) -> Result<Option<K>, Error>
pub fn key(&self) -> Result<Option<K>, Error>
Returns the key at the current position of the cursor
Sourcepub fn primary_key(&self) -> Result<Option<M::Key>, Error>
pub fn primary_key(&self) -> Result<Option<M::Key>, Error>
Returns the primary key at the current position of the cursor
Sourcepub async fn advance(&mut self, count: u32) -> Result<(), Error>
pub async fn advance(&mut self, count: u32) -> Result<(), Error>
Advances the cursor through the next count records in range.
Sourcepub async fn next<Q>(&mut self, key: Option<&Q>) -> Result<(), Error>
pub async fn next<Q>(&mut self, key: Option<&Q>) -> Result<(), Error>
Advances the cursor to the next record in range matching or after key (if provided).
Sourcepub async fn next_primary_key<Q, R>(
&mut self,
key: &Q,
primary_key: &R,
) -> Result<(), Error>
pub async fn next_primary_key<Q, R>( &mut self, key: &Q, primary_key: &R, ) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl<'t, M, K> Freeze for KeyCursor<'t, M, K>
impl<'t, M, K> !RefUnwindSafe for KeyCursor<'t, M, K>
impl<'t, M, K> !Send for KeyCursor<'t, M, K>
impl<'t, M, K> !Sync for KeyCursor<'t, M, K>
impl<'t, M, K> Unpin for KeyCursor<'t, M, K>
impl<'t, M, K> !UnwindSafe for KeyCursor<'t, M, K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more