Anders429 / Anders429/serde_assert

Specifying method for deserializing enum variants

オープン
#48 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。