[][src]Derive Macro dynomite_derive::Item

#[derive(Item)]
{
    // Attributes available to this derive:
    #[partition_key]
    #[sort_key]
    #[dynomite]
}

Derives dynomite::Item type for struts with named fields

Attributes

  • #[dynomite(partition_key)] - required attribute, expected to be applied the target partition attribute field with an derivable DynamoDB attribute value of String, Number or Binary
  • #[dynomite(sort_key)] - optional attribute, may be applied to one target sort attribute field with an derivable DynamoDB attribute value of String, Number or Binary
  • #[dynomite(rename = "actualName")] - optional attribute, may be applied any item attribute field, useful when the DynamoDB table you're interfacing with has attributes whose names don't following Rust's naming conventions

Panics

This proc macro will panic when applied to other types