dynomite 0.2.0

Provides type conversions between DynamoDB types and native Rust types
Documentation

Dynomite provides a set of high level interfaces built on top of rusoto_dynamodb which make interacting with AWS Dynamodb more productive in Rust.

Dynamodb is a nosql database AWS offers as a managed service. It's core abstractions include a table comprised of a collection of "items" which are themselves composed of a collection of named "attributes" which can be one of a finite set of types. You can learn more about DynanoDB's core components here

Rusoto provides an excellent set of interfaces for interacting with the raw DynamoDB API. If you are familiar with the boto project, Rusoto is Rust's analog to that. Rusoto's representation of DynamoDB items is essentially a HashMap of String to AttributeValue types which fits dynamodb's nosql contract well. AttributeValues are able to represent multiple types of values in a single container type.

However, when programming in Rust we're afforded stricter, more concise typing tools than HashMaps when working with data. Dynomite is intended to make those types interface more transparently with rusoto item type apis.

Dynomite provides a set of building blocks for making interactions with DynamoDB feel more natural with Rust's native types.

At a lower level, the Attribute type implementations provide conversion interfaces to and from native Rust scalar types which represent dynamodb's notion of "attributes". The goal of this type is to make representing AWS typed values feel more natural and ergonomic in Rust. You can implement Attribute for your own types an leverage higher level functionality.

At a higher level, Item type implementations provide converstion interfaces for complex types which represent DynamoDB's notion of "items".

💡 A cargo feature named [derive][derive] makes it easy to derive Item for your custom types by leverating the dynomite-derive crate.

Errors

Some operations which require coercion from AWS to Rust types may fail result in an AttributeError. These errors were designed to work with the failure crate ecosystem.

Cargo Features

This crate as two features which are both enabled by default

uuid

This features adds support for implementing Attribute for the uuid crate type Uuid, a useful type for producing and representing unique identifiers for items..

derive

This feature enables the use of the dynomite derive feature which allows you simple add #[derive(Item)] to your structs.

To disable either of these features

[dependencies.dynomite]
version = "xxx"
default-features = false
features = ["feature-you-want"]