Skip to content

ref(server): Make the ourlog header a part of the item container - #4906

Merged
Dav1dde merged 2 commits into
masterfrom
dav1d/item-container-header
Jul 7, 2025
Merged

Dav1dde merged 2 commits into
masterfrom
dav1d/item-container-header

Conversation

@Dav1dde

@Dav1dde Dav1dde commented Jul 7, 2025 •

Copy link
Copy Markdown
Member

Makes the __header added to the OurLog struct officially part of the item container parsing. Each item contained in an item container can have an optional header __header.

We might need some future bike-shedding on naming, currently it's named WithHeader and largely hidden behind the ContainerItems type alias. With some experimentation I was reasonably satisfied with the naming. I plan to explore in a follow-up PR to namespace all types just with the module, e.g. ContainerItems<T> -> container::Items<T>.

Closes: #4881

#skip-changelog

@Dav1dde
Dav1dde requested a review from a team as a code owner July 7, 2025 11:35
struct Layout<T> {
#[serde(bound(deserialize = "T: FromValue"))]
items: AnnotatedItems<T>,
#[serde(bound(deserialize = "T: ContainerItem"))]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this annotation actually necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes:

image

@Dav1dde
Dav1dde force-pushed the dav1d/item-container-header branch 2 times, most recently from a339455 to c005fba Compare July 7, 2025 11:51
@Dav1dde
Dav1dde force-pushed the dav1d/item-container-header branch 2 times, most recently from 44f5435 to 5f48aaf Compare July 7, 2025 12:11
@Dav1dde Dav1dde self-assigned this Jul 7, 2025
@Dav1dde
Dav1dde force-pushed the dav1d/item-container-header branch from 5f48aaf to f296351 Compare July 7, 2025 12:13
@Dav1dde
Dav1dde enabled auto-merge July 7, 2025 12:22
@Dav1dde
Dav1dde added this pull request to the merge queue Jul 7, 2025
Merged via the queue into master with commit d4fb17e Jul 7, 2025
@Dav1dde
Dav1dde deleted the dav1d/item-container-header branch July 7, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend ItemContainer to be able to pass arbitrary headers/metadata for each item

2 participants