Anders429 / Anders429/serde_assert

Specifying method for deserializing enum variants

未关闭
#48 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
5
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

Currently, basically any standard enum deserialization will go through `deserialize_identifier()`, which in turn goes through `visit_str()`. But most implementations will want to support `visit_u64()` and `visit_bytes()`, and will likely want to test this behavior as well. When building a `Deserializer`, we should allow users to specify what method will be used by default.

I am still unsure of how exactly this will look. Should the user still pass in a `Token::UnitVariant` or similar? Or should we just allow other token types in this position? Should we only allow `u64` and `bytes` as alternatives, or should we allow all kinds of things here?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。