serde_dynamo@4.3.0
Using the enum example given here, I'm seeing a trait bound error on to_item:
1. the trait bound `!: std::convert::From<serde_dynamo::Item>` is not satisfied
the trait `std::convert::From<serde_dynamo::Item>` is not implemented for `!` [E0277]
The same thing when using the example given here.
Using the 2021 edition yields a slightly different error:
1. the trait bound `(): std::convert::From<serde_dynamo::Item>` is not satisfied
the trait `From<serde_dynamo::Item>` is not implemented for `()`
but trait `From<aws_lc_rs::error::Unspecified>` is implemented for it
for that trait implementation, expected `aws_lc_rs::error::Unspecified`, found `serde_dynamo::Item` [E0277]
Either way, I'm not sure how to proceed. My own code has the same issue as the examples I have tried.
[Edit]
I've answered my own question. the item must be given the type serde_dynamo::Item.
let item: Item = to_item(data)?;
Leaving open because it seems the docs need updating.
[Edit Edit]
It turns out the correct type is not Item but
HashMap<String, AttributeValue>
And I needed to use the feature flag aws-sdk-dynamodb+1
Would love it if someone could point out where this is mentioned in the documentation.
serde_dynamo@4.3.0Using the enum example given here, I'm seeing a trait bound error on
to_item:The same thing when using the example given here.
Using the 2021 edition yields a slightly different error:
Either way, I'm not sure how to proceed. My own code has the same issue as the examples I have tried.
[Edit]
I've answered my own question. the item must be given the type
serde_dynamo::Item.Leaving open because it seems the docs need updating.
[Edit Edit]
It turns out the correct type is not
ItembutAnd I needed to use the feature flag
aws-sdk-dynamodb+1Would love it if someone could point out where this is mentioned in the documentation.