pub struct Rows {
pub columns: Vec<String>,
pub data: Vec<Vec<Value>>,
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>
§data: Vec<Vec<Value>>
§count: Option<usize>
can be optionally set, indicates how many total rows are there in the table
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rows
impl<'de> Deserialize<'de> for Rows
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Rows, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Rows, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Rows
impl Serialize for Rows
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Rows
Auto Trait Implementations§
impl Freeze for Rows
impl RefUnwindSafe for Rows
impl Send for Rows
impl Sync for Rows
impl Unpin for Rows
impl UnwindSafe for Rows
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