serde it can serialize and deserialize many data structures to yaml, toml, etc #[derive(Serialize, Deserialize)] pub struct User { id: String, name: String, age: u8, } fn main() { let input = ScanInput { table_name: "users".to_string(), ..ScanInput::default(); }; let result = client.scan(input).await?; if let Some(items) = result.items { let users: Vec<User> = serde_dynamo::from_items(items)?; println!("Got {} users", user.len()); } }
Rust - common crates
Rust - common crates
Rust - common crates
serde it can serialize and deserialize many data structures to yaml, toml, etc #[derive(Serialize, Deserialize)] pub struct User { id: String, name: String, age: u8, } fn main() { let input = ScanInput { table_name: "users".to_string(), ..ScanInput::default(); }; let result = client.scan(input).await?; if let Some(items) = result.items { let users: Vec<User> = serde_dynamo::from_items(items)?; println!("Got {} users", user.len()); } }