serde_dynamodb_streams

Crates.ioserde_dynamodb_streams
lib.rsserde_dynamodb_streams
version0.7.1
sourcesrc
created_at2021-03-16 05:19:41.590531
updated_at2021-03-16 07:43:16.738014
descriptionde/serialize struct to HashMap with Serde to use with Rusoto DynamoDB Streams. Just a fork of mockersf/serde_dynamodb with different feature flags
homepagehttps://github.com/james-tru/serde_dynamodb_streams
repositoryhttps://github.com/james-tru/serde_dynamodb_streams
max_upload_size
id369535
size73,802
(james-tru)

documentation

https://docs.rs/serde_dynamodb

README

serde_dynamodb_streams License: MIT Build Status Build status Coverage 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

This is just a fork of https://github.com/mockersf/serde_dynamodb with the dynamodb bits taken out, so that streams can handle rustls

[dependencies]
serde_dynamodb_streams = "0.2.1"

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();
Commit count: 176

cargo fmt