Skip to content

Talk with dynamodb using your existing structs thanks to serde

License

Notifications You must be signed in to change notification settings

veedubyou/serde_dynamodb

 
 

Repository files navigation

serde_dynamodb License: MIT Build Status Build status Realease Doc Crate

Library to de/serialize an object to an HashMap of AttributeValues used by rusoto_dynamodb to manipulate objects saved in dynamodb using serde

The API docs for the master branch are published here.

Example

#[derive(Serialize, Deserialize)]
struct Todo {
    id: uuid::Uuid,
    title: &'static str,
    done: bool,
}

let todo = Todo {
    id: uuid::Uuid::new_v4(),
    title: "publish crate",
    done: false,
};

let put_item = PutItemInput {
    item: serde_dynamodb::to_hashmap(&todo).unwrap(),
    table_name: "todos".to_string(),
    ..Default::default()
};

let client = DynamoDbClient::simple(Region::UsEast1);
client.put_item(&put_item).unwrap();

About

Talk with dynamodb using your existing structs thanks to serde

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.3%
  • Shell 0.7%