We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I think serde support would be nice.
The text was updated successfully, but these errors were encountered:
Specifically, I'm trying to match currencies with open exchange rates API:
#[derive(Debug, Clone, Deserialize)] struct Response { base: Currency, rates: HashMap<Currency, f32>, } let app_id = "SECRET"; let uri = format!( "http://openexchangerates.org/api/latest.json", app_id ); // response: // { // base: "USD", // rates: { // AED: 3.672538, // AFN: 66.809999, // ... // } // } #[derive(Debug, Clone, Deserialize)] struct Response { base: Currency, rates: RatesMap, } let response: Response = reqwest::get(uri).await?.json().await?;
So for this example, Currency should also derive Eq and Hash.
Eq
Hash
Would you consider such a PR with serde behind a feature flag ?
Sorry, something went wrong.
Sounds great!
Successfully merging a pull request may close this issue.
Hello,
I think serde support would be nice.
The text was updated successfully, but these errors were encountered: