pub struct Rows<'a> { /* private fields */ }Expand description
Stepping iterator over query rows. Obtained from PreparedStatement::query.
Uses a lending-iterator pattern: next() returns Result<Option<Row<'_>>>
where the Row borrows from &mut self. Incompatible with std::iter::Iterator
because the row’s lifetime is tied to the stepper — same design as rusqlite’s
Rows.
Implementations§
Source§impl<'a> Rows<'a>
impl<'a> Rows<'a>
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Number of output columns.
Sourcepub fn column_names(&self) -> &[String]
pub fn column_names(&self) -> &[String]
Output column names.
Sourcepub fn collect(self) -> Result<QueryResult>
pub fn collect(self) -> Result<QueryResult>
Drain all remaining rows into a QueryResult.
Auto Trait Implementations§
impl<'a> Freeze for Rows<'a>
impl<'a> !RefUnwindSafe for Rows<'a>
impl<'a> !Send for Rows<'a>
impl<'a> !Sync for Rows<'a>
impl<'a> Unpin for Rows<'a>
impl<'a> UnsafeUnpin for Rows<'a>
impl<'a> !UnwindSafe for Rows<'a>
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