#[non_exhaustive]pub struct Cursor<'a> { /* private fields */ }Expand description
A cursor for fetching a large result set in batches.
Created via Connection::query_cursor. Each call to Cursor::fetch_next
returns the next batch of rows. The cursor is automatically closed when
dropped, but explicit Cursor::close is recommended for clean shutdown.
Implementations§
Source§impl<'a> Cursor<'a>
impl<'a> Cursor<'a>
Sourcepub async fn fetch_next(&mut self) -> Result<Vec<Row>>
pub async fn fetch_next(&mut self) -> Result<Vec<Row>>
Fetch the next batch of rows.
Returns an empty vector when all rows have been consumed.
Auto Trait Implementations§
impl<'a> Freeze for Cursor<'a>
impl<'a> !RefUnwindSafe for Cursor<'a>
impl<'a> Send for Cursor<'a>
impl<'a> Sync for Cursor<'a>
impl<'a> Unpin for Cursor<'a>
impl<'a> UnsafeUnpin for Cursor<'a>
impl<'a> !UnwindSafe for Cursor<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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