[][src]Function dynamodb_data::from_fields

pub fn from_fields<A: DeserializeOwned>(
    value: HashMap<String, AttributeValue>
) -> Result<A, Error>

Must be something that serializes from 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");
let msg: HashMap<String, u32> = dynamodb_data::from_fields(msg).expect("from_fields failed");