Page MenuHomePhabricator

[util-macros] Improve TagAwareDeserialize to read serde attributes
ClosedPublic

Authored by bartek on Jul 28 2024, 7:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 8:47 PM
Unknown Object (File)
Sun, Dec 22, 8:47 PM
Unknown Object (File)
Sun, Dec 22, 8:47 PM
Unknown Object (File)
Sun, Dec 22, 8:46 PM
Unknown Object (File)
Sun, Dec 22, 8:46 PM
Unknown Object (File)
Nov 26 2024, 10:11 AM
Unknown Object (File)
Nov 26 2024, 12:15 AM
Unknown Object (File)
Nov 22 2024, 6:46 PM
Subscribers

Details

Summary

Some small improvements to the TagAwareDeserialize macro:

  • Verify if #[serde(remote = "Self", tag = "...")] is present
  • Allow any serde tag, not necessarily "type"

Depends on D12902

Test Plan

cargo test - Macro still works

Removing e.g. tag results in IDE (rust-analyzer) error:

Screenshot 2024-07-28 at 16.39.21.png (348×1 px, 115 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jul 28 2024, 8:11 AM
This revision is now accepted and ready to land.Jul 29 2024, 2:07 AM