[−][src]Trait dynomite::Attribute
A type capable of being converted into an or from and AWS AttributeValue
Default implementations of this are provided for each type of AttributeValue
field
which map to naturally fitting native Rustlang types.
Examples
use dynomite::{dynamodb::AttributeValue, Attribute}; assert_eq!( "test".to_string().into_attr().s, AttributeValue { s: Some("test".to_string()), ..AttributeValue::default() } .s );
Required methods
fn into_attr(self) -> AttributeValue
Returns a conversion into an AttributeValue
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
Returns a fallible conversion from an AttributeValue
Implementations on Foreign Types
impl<A: Attribute> Attribute for HashMap<String, A>
[src]
A Map type for Items for HashMaps, represented as the M
AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl<A: Attribute> Attribute for BTreeMap<String, A>
[src]
A Map type for Items
for BTreeMaps
, represented as the M
AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for Uuid
[src]
A String
type for Uuids
, represented by the S
AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for DateTime<Utc>
[src]
An rfc3339
formatted version of DateTime<Utc>
, represented by the S
AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for DateTime<Local>
[src]
An rfc3339
formatted version of DateTime<Local>
, represented by the S
AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for DateTime<FixedOffset>
[src]
An rfc3339
formatted version of DateTime<FixedOffset>
, represented by the S
AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for SystemTime
[src]
An rfc3339
formatted version of SystemTime
, represented by the S
AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for String
[src]
A String
type, represented by the S AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl<'a> Attribute for Cow<'a, str>
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<String>
[src]
A String Set type, represented by the SS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for BTreeSet<String>
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<Vec<u8>>
[src]
A Binary Set type, represented by the BS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for bool
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for Bytes
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for Vec<u8>
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl<A: Attribute> Attribute for Vec<A>
[src]
A List type for vectors, represented by the L AttributeValue type
Note: Vectors support homogenious collection values. This means
the default supported scalars do not permit cases where you need
to store a list of heterogenus values. To accomplish this you'll need
to implement a wrapper type that represents your desired variants
and implement Attribute
for YourType
. An Vec<YourType>
implementation
will already be provided
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl<T: Attribute> Attribute for Option<T>
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for u16
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for i16
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for u32
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for i32
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for u64
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for i64
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for f32
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for f64
[src]
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<u16>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for BTreeSet<u16>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<i16>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for BTreeSet<i16>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<u32>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for BTreeSet<u32>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<i32>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for BTreeSet<i32>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<i64>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for BTreeSet<i64>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for HashSet<u64>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
impl Attribute for BTreeSet<u64>
[src]
A Number set type, represented by the NS AttributeValue type
fn into_attr(self) -> AttributeValue
[src]
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>
[src]
Implementors
impl<T: Item> Attribute for T
[src]
A Map type for Items, represented as the M
AttributeValue type