pub struct ResultSet { /* private fields */ }
Expand description
Encapsulates a set of results and their respective column names.
Implementations§
Source§impl ResultSet
impl ResultSet
Sourcepub fn new(
names: Vec<String>,
rows: Vec<Vec<ParameterizedValue<'static>>>,
) -> Self
pub fn new( names: Vec<String>, rows: Vec<Vec<ParameterizedValue<'static>>>, ) -> Self
Creates a new instance, bound to the given column names and result rows.
Sourcepub fn first(&self) -> Option<ResultRowRef<'_>>
pub fn first(&self) -> Option<ResultRowRef<'_>>
Returns the first row of the ResultSet
, or None if the set is empty.
Sourcepub fn get(&self, index: usize) -> Option<ResultRowRef<'_>>
pub fn get(&self, index: usize) -> Option<ResultRowRef<'_>>
Returns a reference to a row in a given position.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResultSet
impl RefUnwindSafe for ResultSet
impl Send for ResultSet
impl Sync for ResultSet
impl Unpin for ResultSet
impl UnwindSafe for ResultSet
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