[−][src]Function dynamodb_data::to_fields
pub fn to_fields<A: Serialize>(
value: A
) -> Result<HashMap<String, AttributeValue>, Error>
Must be something that serializes to a JSON Object.
use std::collections::HashMap; use std::iter::FromIterator; let mut object: HashMap<String, u32> = HashMap::from_iter(vec![ (String::from("red"), 1), (String::from("green"), 2), (String::from("blue"), 3) ]); let msg: HashMap<String, rusoto_dynamodb::AttributeValue> = dynamodb_data::to_fields(object).expect("to_fields issue");