pub struct RowIter<'t> { /* private fields */ }Expand description
Iterator over rows of a table.
This is an in-flight type and is !Send + !Sync (thread-affine).
Rows are produced via RowIter::next, which invokes a callback with a borrowed slice of
CellRef.
Implementations§
Source§impl<'t> RowIter<'t>
impl<'t> RowIter<'t>
Sourcepub fn next<F>(&mut self, on_row: F) -> Result<bool>
pub fn next<F>(&mut self, on_row: F) -> Result<bool>
Advance to the next row and invoke on_row.
Returns:
Ok(true)if a row was produced andon_rowwas calledOk(false)if the iterator is exhausted
§Lifetimes
For CellRef::Text and CellRef::Json, the returned byte slices remain valid until the next
call to RowIter::next on the same iterator (or until the iterator is dropped).
§Errors
Returns an Error if the runtime reports an error while advancing.
Trait Implementations§
Auto Trait Implementations§
impl<'t> Freeze for RowIter<'t>
impl<'t> RefUnwindSafe for RowIter<'t>
impl<'t> !Send for RowIter<'t>
impl<'t> !Sync for RowIter<'t>
impl<'t> Unpin for RowIter<'t>
impl<'t> UnsafeUnpin for RowIter<'t>
impl<'t> !UnwindSafe for RowIter<'t>
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