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)
Wed, Mar 5, 12:24 AM
Unknown Object (File)
Mon, Mar 3, 6:24 AM
Unknown Object (File)
Mon, Mar 3, 6:24 AM
Unknown Object (File)
Mon, Mar 3, 6:24 AM
Unknown Object (File)
Fri, Feb 28, 6:05 AM
Unknown Object (File)
Fri, Feb 28, 5:02 AM
Unknown Object (File)
Jan 25 2025, 6:01 PM
Unknown Object (File)
Jan 22 2025, 3:39 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