HomePhabricator
Diffusion Comm e33868cba63d

[util-macros] Improve TagAwareDeserialize to read serde attributes

Description

[util-macros] Improve TagAwareDeserialize to read serde attributes

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)

Reviewers: varun, will, kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D12903

Details

Provenance
bartekAuthored on Jul 28 2024, 4:54 AM
Reviewer
kamil
Differential Revision
D12903: [util-macros] Improve TagAwareDeserialize to read serde attributes
Parents
rCOMMa1ec2400de91: [util-macros] Add tests for serde and TagAwareDeserialize behavior
Branches
Unknown
Tags
Unknown