(rows: Vec<Row>)
| 39 | } |
| 40 | |
| 41 | fn try_convert(rows: Vec<Row>) -> Result<HashMap<String, Organization>> { |
| 42 | let mut map: HashMap<String, Organization> = HashMap::new(); |
| 43 | for row in rows { |
| 44 | map.insert(row.id.to_string(), row.try_into()?); |
| 45 | } |
| 46 | |
| 47 | Ok(map) |
| 48 | } |
| 49 | |
| 50 | impl Loader<String> for OrganizationLoader { |
| 51 | type Value = Organization; |