Skip to content

ref(attributes): Introduce AttributeLike for shared normalizations#6235

Merged
Dav1dde merged 1 commit into
masterfrom
dav1d/attribute-like
Jul 16, 2026
Merged

ref(attributes): Introduce AttributeLike for shared normalizations#6235
Dav1dde merged 1 commit into
masterfrom
dav1d/attribute-like

Conversation

@Dav1dde

@Dav1dde Dav1dde commented Jul 15, 2026

Copy link
Copy Markdown
Member

As we discussed in TSC, an attempt to allow normalizations to operate on SpanData as well as Attributes, which is handy for normalizations like in #6201.

Considered adding more API surface, such as into_value(), or meta() accessors, decided against it for now, we should add them as the need arises.

@Dav1dde Dav1dde self-assigned this Jul 15, 2026
@Dav1dde
Dav1dde requested a review from a team as a code owner July 15, 2026 12:52
@Dav1dde
Dav1dde force-pushed the dav1d/attribute-like branch from 2546c2f to 4a003f5 Compare July 15, 2026 12:53
@loewenheim

Copy link
Copy Markdown
Contributor

AFAICT the trait has more of an API than strictly necessary even now, right?

@Dav1dde

Dav1dde commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

Yes, it has more than necessary, remove/insert/contains_key are convenient and mirror Attributes with the intent to make migrating a bit easier from Attributes to impl AttributesLike. Similar the as_* variants, I feel like these are the most common API you need.

I am somewhat confident these methods will be useful, more niche ones like into_value() I am not sure.

@Dav1dde
Dav1dde added this pull request to the merge queue Jul 16, 2026
Merged via the queue into master with commit d60ad7b Jul 16, 2026
37 checks passed
@Dav1dde
Dav1dde deleted the dav1d/attribute-like branch July 16, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants