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
F2762331: D12903.id42851.diff
Thu, Sep 19, 9:24 AM
F2762295: D12903.id42849.diff
Thu, Sep 19, 9:23 AM
F2761977: D12903.id42887.diff
Thu, Sep 19, 8:56 AM
Unknown Object (File)
Fri, Sep 6, 12:34 AM
Unknown Object (File)
Thu, Sep 5, 2:41 AM
Unknown Object (File)
Wed, Sep 4, 7:39 PM
Unknown Object (File)
Sun, Sep 1, 4:45 AM
Unknown Object (File)
Sun, Sep 1, 4:45 AM
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