I am trying to reduce the bloat, as I only read json to fill one fairly simple struct. However, I get a problem with reqwest client compatibility.
More precisely, the following code fails on .json::<PriceStruct>()
with error:
error[E0277]: the trait bound
for<'de> structs::PriceStruct: serde::de::Deserialize<'de>
is not satisfied`
Is there any way to get round this with miniserde?
let resp = client
.get(&uri)
.send()
.await.with_context(|| format!("{}: getprice client-request failed at {},{}",file!(),line!(),column!()))?
.json::<PriceStruct>()
.await.with_context(|| format!("{}: getprice failed to parse json at {},{}",file!(),line!(),column!()))?;