Skip to content

Add support for writing to embedded_io::Write #80

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

elrafoon
Copy link
Contributor

Hello,

I think this feature is quite useful for many users.

It's feature-gated, so shall be harmless for others.

@elrafoon
Copy link
Contributor Author

Dear maintainers, is there any problem with this one?

Copy link
Member

@eldruin eldruin left a comment

Choose a reason for hiding this comment

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

Thank you for this PR.
I am not familiar enough with this crate to judge these changes, though.
Maybe @jordens has an opinion?

@jordens
Copy link
Contributor

jordens commented Feb 1, 2024

  • I'm worried by the dyn SerializerBackend. serde_json::Serializer is just generic over io::Write. That would be better.
  • It's missing the analogous Deserializer changes.

@ryan-summers
Copy link
Member

I'm not sure I fully understand the use case. Can you provide a small example of what you're looking to do in code that this enables?

@elrafoon
Copy link
Contributor Author

elrafoon commented Feb 17, 2024

In meantime I got better idea. We could add our own Read and Write traits, and then implement those traits for embedded_io::{Read, Write}. Serializer would be generic over Read and Deserializer over Write.

It would look like here

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants