pub struct Cursor { /* private fields */ }Expand description
Streaming cursor over object store or secondary index rows.
Implementations§
Source§impl Cursor
impl Cursor
Sourcepub fn primary_key(&self) -> &str
pub fn primary_key(&self) -> &str
Returns the current row’s primary key.
Sourcepub fn value(&self) -> Result<Record, IndexedDBError>
pub fn value(&self) -> Result<Record, IndexedDBError>
Returns the current row value.
Sourcepub async fn continue_next(&mut self) -> Result<bool, IndexedDBError>
pub async fn continue_next(&mut self) -> Result<bool, IndexedDBError>
Advances the cursor by one row.
Sourcepub async fn continue_to_key(
&mut self,
key: Value,
) -> Result<bool, IndexedDBError>
pub async fn continue_to_key( &mut self, key: Value, ) -> Result<bool, IndexedDBError>
Advances the cursor to key, or exhausts it if key does not exist.
Sourcepub async fn advance(&mut self, count: i32) -> Result<bool, IndexedDBError>
pub async fn advance(&mut self, count: i32) -> Result<bool, IndexedDBError>
Skips count rows ahead.
Sourcepub async fn delete(&mut self) -> Result<(), IndexedDBError>
pub async fn delete(&mut self) -> Result<(), IndexedDBError>
Deletes the current row and keeps the cursor open.
Sourcepub async fn update(&mut self, value: Record) -> Result<(), IndexedDBError>
pub async fn update(&mut self, value: Record) -> Result<(), IndexedDBError>
Replaces the current row and keeps the cursor open.
Sourcepub async fn close(self) -> Result<(), IndexedDBError>
pub async fn close(self) -> Result<(), IndexedDBError>
Closes the cursor stream and releases its transport resources.
Trait Implementations§
Source§impl CursorApi for Cursor
impl CursorApi for Cursor
Source§fn primary_key(&self) -> &str
fn primary_key(&self) -> &str
Returns the current row’s primary key.
Source§fn continue_next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<bool, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn continue_next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<bool, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Advances the cursor by one row.
Source§fn continue_to_key<'life0, 'async_trait>(
&'life0 mut self,
key: Value,
) -> Pin<Box<dyn Future<Output = Result<bool, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn continue_to_key<'life0, 'async_trait>(
&'life0 mut self,
key: Value,
) -> Pin<Box<dyn Future<Output = Result<bool, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Advances the cursor to key, or exhausts it if key does not exist.
Source§fn advance<'life0, 'async_trait>(
&'life0 mut self,
count: i32,
) -> Pin<Box<dyn Future<Output = Result<bool, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn advance<'life0, 'async_trait>(
&'life0 mut self,
count: i32,
) -> Pin<Box<dyn Future<Output = Result<bool, IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Skips count rows ahead.
Source§fn delete<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), IndexedDBError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes the current row and keeps the cursor open.
Auto Trait Implementations§
impl !RefUnwindSafe for Cursor
impl !UnwindSafe for Cursor
impl Freeze for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request