pub struct Rows {
pub columns: Vec<String, Global>,
pub data: Vec<Vec<Value, Global>, Global>,
pub count: Option<usize>,
}
Expand description
use this to store data retrieved from the database
This is also slimmer than Vec
Fields
columns: Vec<String, Global>
data: Vec<Vec<Value, Global>, Global>
count: Option<usize>
can be optionally set, indicates how many total rows are there in the table
Implementations
sourceimpl Rows
impl Rows
pub fn empty() -> Rows
pub fn new(columns: Vec<String, Global>) -> Rows
pub fn push(&mut self, row: Vec<Value, Global>)
sourcepub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = Value;
pub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = Value;
Returns an iterator over the Row
s.
pub fn len(&self) -> usize
Trait Implementations
impl StructuralPartialEq for Rows
Auto Trait Implementations
impl RefUnwindSafe for Rows
impl Send for Rows
impl Sync for Rows
impl Unpin for Rows
impl UnwindSafe for Rows
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more