mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 03:31:02 +00:00
Mention the shorthand for identifiers
This commit is contained in:
@@ -935,6 +935,10 @@ impl<'de> Deserialize<'de> for PathBuf {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// If this were outside of the serde crate, it would just use:
|
||||||
|
//
|
||||||
|
// #[derive(Deserialize)]
|
||||||
|
// #[serde(variant_identifier)]
|
||||||
#[cfg(all(feature = "std", any(unix, windows)))]
|
#[cfg(all(feature = "std", any(unix, windows)))]
|
||||||
enum OsStringKind {
|
enum OsStringKind {
|
||||||
Unix,
|
Unix,
|
||||||
@@ -1149,6 +1153,10 @@ impl<'de> Deserialize<'de> for Duration {
|
|||||||
where
|
where
|
||||||
D: Deserializer<'de>,
|
D: Deserializer<'de>,
|
||||||
{
|
{
|
||||||
|
// If this were outside of the serde crate, it would just use:
|
||||||
|
//
|
||||||
|
// #[derive(Deserialize)]
|
||||||
|
// #[serde(field_identifier, rename_all = "lowercase")]
|
||||||
enum Field {
|
enum Field {
|
||||||
Secs,
|
Secs,
|
||||||
Nanos,
|
Nanos,
|
||||||
@@ -1284,6 +1292,10 @@ where
|
|||||||
where
|
where
|
||||||
D: Deserializer<'de>,
|
D: Deserializer<'de>,
|
||||||
{
|
{
|
||||||
|
// If this were outside of the serde crate, it would just use:
|
||||||
|
//
|
||||||
|
// #[derive(Deserialize)]
|
||||||
|
// #[serde(field_identifier, rename_all = "lowercase")]
|
||||||
enum Field {
|
enum Field {
|
||||||
Start,
|
Start,
|
||||||
End,
|
End,
|
||||||
@@ -1438,6 +1450,10 @@ where
|
|||||||
where
|
where
|
||||||
D: Deserializer<'de>,
|
D: Deserializer<'de>,
|
||||||
{
|
{
|
||||||
|
// If this were outside of the serde crate, it would just use:
|
||||||
|
//
|
||||||
|
// #[derive(Deserialize)]
|
||||||
|
// #[serde(variant_identifier)]
|
||||||
enum Field {
|
enum Field {
|
||||||
Ok,
|
Ok,
|
||||||
Err,
|
Err,
|
||||||
|
|||||||
Reference in New Issue
Block a user