You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any examples of how to convert between these two types? Or how to go from a rust struct to google.protobuf.Value? I thought with the serde support we would get this out of the box, but I am running into this error:
error[E0277]: the trait bound `prost_wkt_types::Value: From<serde_json::Value>` is not satisfied
--> src/tonic.rs:108:55
|
108 | let aaaaaaaaaa = prost_wkt_types::Value::from(aaaaaaaaaa);
| ---------------------------- ^^^^^^^^^^ the trait `From<serde_json::Value>` is not implemented for `prost_wkt_types::Value`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<prost_wkt_types::Value as From<HashMap<std::string::String, prost_wkt_types::Value>>>
<prost_wkt_types::Value as From<Vec<prost_wkt_types::Value>>>
<prost_wkt_types::Value as From<bool>>
<prost_wkt_types::Value as From<f64>>
<prost_wkt_types::Value as From<prost_wkt_types::NullValue>>
<prost_wkt_types::Value as From<std::string::String>>
I documented how I was able to do this manually without prost-wkt in this StackOverflow answer, but it would be great to use the Serialize/Deserialize machinery here.
The text was updated successfully, but these errors were encountered:
Is there any examples of how to convert between these two types? Or how to go from a rust struct to
google.protobuf.Value
? I thought with the serde support we would get this out of the box, but I am running into this error:I documented how I was able to do this manually without prost-wkt in this StackOverflow answer, but it would be great to use the Serialize/Deserialize machinery here.
The text was updated successfully, but these errors were encountered: