Deserialize all rows into a vector of the given type Each row is converted to a JSON object and then deserialized into the target type using serde. # Type Parameters `T` - Type to deserialize each row into (must implement Deserialize) # Examples ```no_run use serde::Deserialize; # use graphlite_sdk::GraphLite; #[derive(Deserialize)] struct Person { name: String, age: u32 } # fn main() -> Re
(&self)
| 100 | /// # } |
| 101 | /// ``` |
| 102 | pub fn deserialize_rows<T: DeserializeOwned>(&self) -> Result<Vec<T>> { |
| 103 | let mut results = Vec::new(); |
| 104 | |
| 105 | for row in &self.inner.rows { |
| 106 | let item = self.deserialize_row::<T>(row)?; |
| 107 | results.push(item); |
| 108 | } |
| 109 | |
| 110 | Ok(results) |
| 111 | } |
| 112 | |
| 113 | /// Deserialize a single row into the given type |
| 114 | /// |