Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serde support? #24

Closed
Uinelj opened this issue Jun 30, 2021 · 5 comments
Closed

serde support? #24

Uinelj opened this issue Jun 30, 2021 · 5 comments

Comments

@Uinelj
Copy link
Contributor

Uinelj commented Jun 30, 2021

Hello,

I'm using the warc library and need to serialize WARC headers, a feature that is not yet supported/implemented.

Although one can say that serde support is not in the scope of the crate (which I believe is a valid point of view), I think that it would fit the potential usage of warc.
Moreover, serde could be a feature flag, thus letting the users decide!

I've already implemented a quick way of serializing headers in my fork, and would be glad to participate in implementing the feature in the main repository if needed :)

@jedireza
Copy link
Owner

Thanks @Uinelj. This diff seems pretty tame. I'm going to defer to @jhwgh1968

@jhwgh1968
Copy link
Collaborator

Hi @Uinelj, if you put back the ToString impl you deleted (which is used a lot), this is completely fine with me. Feel free to submit a PR.

That said, know that I am currently working on an API overhaul (slowly). I would not block you, but the next release (0.3.0) may be a while yet. You would have to base your work on current master until then.

@Uinelj
Copy link
Contributor Author

Uinelj commented Jul 1, 2021

If I'm not mistaken, the Rust docs states that ToString shouldn't be implemented directly, as implementing Display gets us the ToString implementation automagically. However if there's a reason to keep ToString only I'd be completely fine removing my change (and learning a bit more about Rust :))

Here's a minimal example from the playground.

I'll base my work on current as it is already the case.

@jhwgh1968
Copy link
Collaborator

If I'm not mistaken, the Rust docs states that ToString shouldn't be implemented directly, as implementing Display gets us the ToString implementation automagically.

I missed that. LGTM then!

@jhwgh1968
Copy link
Collaborator

Closed by #25

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

No branches or pull requests

3 participants