Skip to content

Comments

Add ability to deserialize from Attributes#863

Merged
dralley merged 7 commits intotafia:masterfrom
Mingun:attr-de
May 9, 2025
Merged

Add ability to deserialize from Attributes#863
dralley merged 7 commits intotafia:masterfrom
Mingun:attr-de

Conversation

@Mingun
Copy link
Collaborator

@Mingun Mingun commented May 8, 2025

This PR adds ability to convert Attributes iterator into a serde's MapAccess and Deserializer, so it will be easely to mix serde-based and reader-based approaches.

The implementation will require to move Decoder into the Attributes and, as a consequence, to BytesStart. That is already was required for other purposes, but this will increase the size of both structs by 8 bytes. I still think it is a fair price for the benefits.

@Mingun Mingun requested a review from dralley May 8, 2025 13:14
@Mingun Mingun added enhancement serde Issues related to mapping from Rust types to XML labels May 8, 2025
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 54.95495% with 50 lines in your changes missing coverage. Please review.

Project coverage is 60.54%. Comparing base (a9391f3) to head (f089766).
Report is 44 commits behind head on master.

Files with missing lines Patch % Lines
src/de/attributes.rs 0.00% 44 Missing ⚠️
src/events/attributes.rs 50.00% 4 Missing ⚠️
src/events/mod.rs 89.47% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #863      +/-   ##
==========================================
+ Coverage   60.21%   60.54%   +0.33%     
==========================================
  Files          41       42       +1     
  Lines       16021    16078      +57     
==========================================
+ Hits         9647     9735      +88     
+ Misses       6374     6343      -31     
Flag Coverage Δ
unittests 60.54% <54.95%> (+0.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dralley dralley merged commit f9c4309 into tafia:master May 9, 2025
7 checks passed
@Mingun Mingun deleted the attr-de branch May 9, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement serde Issues related to mapping from Rust types to XML

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants