JulianSchmid / etherparse

A rust library for parsing ethernet & ethernet using protocols.
Apache License 2.0
286 stars 54 forks source link

Add serde derive macros where applicable #43

Closed daviessm closed 1 year ago

daviessm commented 1 year ago

I had a requirement to serialize packets. What would you think of adding serde support to the package, behind a feature flag?

JulianSchmid commented 1 year ago

Hi @daviessm ,

I like it, but I would as you proposed (and did) put it behind a non default feature flag.

Greets Julian

JulianSchmid commented 1 year ago

Sorry I forgot: Thanks for the pull request πŸ‘ .

codecov[bot] commented 1 year ago

Codecov Report

Base: 99.63% // Head: 99.58% // Decreases project coverage by -0.05% :warning:

Coverage data is based on head (cb9d36c) compared to base (05ac511). Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #43 +/- ## ========================================== - Coverage 99.63% 99.58% -0.06% ========================================== Files 51 51 Lines 21898 21910 +12 ========================================== Hits 21818 21818 - Misses 80 92 +12 ``` | [Impacted Files](https://codecov.io/gh/JulianSchmid/etherparse/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid) | Coverage Ξ” | | |---|---|---| | [src/internet/ip.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwLnJz) | `100.00% <ΓΈ> (ΓΈ)` | | | [src/internet/ip\_authentication.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwX2F1dGhlbnRpY2F0aW9uLnJz) | `98.52% <0.00%> (-1.48%)` | :arrow_down: | | [src/internet/ipv4.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwdjQucnM=) | `99.40% <0.00%> (-0.60%)` | :arrow_down: | | [src/internet/ipv4\_extensions.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwdjRfZXh0ZW5zaW9ucy5ycw==) | `100.00% <ΓΈ> (ΓΈ)` | | | [src/internet/ipv6.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwdjYucnM=) | `100.00% <ΓΈ> (ΓΈ)` | | | [src/internet/ipv6\_extensions.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwdjZfZXh0ZW5zaW9ucy5ycw==) | `100.00% <ΓΈ> (ΓΈ)` | | | [src/internet/ipv6\_fragment.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwdjZfZnJhZ21lbnQucnM=) | `100.00% <ΓΈ> (ΓΈ)` | | | [src/internet/ipv6\_raw\_extension.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2ludGVybmV0L2lwdjZfcmF3X2V4dGVuc2lvbi5ycw==) | `97.87% <0.00%> (-2.13%)` | :arrow_down: | | [src/link/ethernet.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2xpbmsvZXRoZXJuZXQucnM=) | `100.00% <ΓΈ> (ΓΈ)` | | | [src/link/vlan\_tagging.rs](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid#diff-c3JjL2xpbmsvdmxhbl90YWdnaW5nLnJz) | `100.00% <ΓΈ> (ΓΈ)` | | | ... and [6 more](https://codecov.io/gh/JulianSchmid/etherparse/pull/43/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Julian+Schmid)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

daviessm commented 1 year ago

Hi @JulianSchmid, thanks for the review! I implemented this because I thought I needed it in a project but ended up writing a custom serializer in my code instead so I won't have any time to work on this any more. I'd be happy for this to be closed or taken over by someone else, whatever works best for you.

JulianSchmid commented 1 year ago

Hi @daviessm , then I would take over the PR and implement it.

JulianSchmid commented 1 year ago

I moved to branch to this repo and opened up a new PR https://github.com/JulianSchmid/etherparse/pull/45