Skip to content

Conversation

mariusae
Copy link
Member

@mariusae mariusae commented Sep 21, 2025

Stack from ghstack (oldest at bottom):

We introduce AttrValue, which must be implemented by all value types in attribute dictionary. AttrValue 1) gathers all the requirements (Send, Serialize, Named, ...) of attribute values, and 2) introduces AttrValue::display and AttrValue::parse, to be used when attribute values are presented to humans.

In most cases, display and parse can be derived from the type's ToString and FromStr implementations. The change includes a derive macro to bridge these.

Differential Revision: D82921321

We introduce `AttrValue`, which must be implemented by all value types in attribute dictionary. AttrValue 1) gathers all the requirements (Send, Serialize, Named, ...) of attribute values, and 2) introduces `AttrValue::display` and `AttrValue::parse`, to be used when attribute values are presented to humans.

In most cases, `display` and `parse` can be derived from the type's `ToString` and `FromStr` implementations. The change includes a derive macro to bridge these.

Differential Revision: [D82921321](https://our.internmc.facebook.com/intern/diff/D82921321/)

[ghstack-poisoned]
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 21, 2025
@facebook-github-bot
Copy link
Contributor

@mariusae has exported this pull request. If you are a Meta employee, you can view the originating diff in D82921321.

We introduce `AttrValue`, which must be implemented by all value types in attribute dictionary. AttrValue 1) gathers all the requirements (Send, Serialize, Named, ...) of attribute values, and 2) introduces `AttrValue::display` and `AttrValue::parse`, to be used when attribute values are presented to humans.

In most cases, `display` and `parse` can be derived from the type's `ToString` and `FromStr` implementations. The change includes a derive macro to bridge these.

Differential Revision: [D82921321](https://our.internmc.facebook.com/intern/diff/D82921321/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@mariusae has exported this pull request. If you are a Meta employee, you can view the originating diff in D82921321.

We introduce `AttrValue`, which must be implemented by all value types in attribute dictionary. AttrValue 1) gathers all the requirements (Send, Serialize, Named, ...) of attribute values, and 2) introduces `AttrValue::display` and `AttrValue::parse`, to be used when attribute values are presented to humans.

In most cases, `display` and `parse` can be derived from the type's `ToString` and `FromStr` implementations. The change includes a derive macro to bridge these.

Differential Revision: [D82921321](https://our.internmc.facebook.com/intern/diff/D82921321/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@mariusae has exported this pull request. If you are a Meta employee, you can view the originating diff in D82921321.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 8a4e042.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants