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

Add a Serializer that works with bytes crate's MutBuf instead of io::Write #87

Closed
tikue opened this issue Sep 9, 2016 · 4 comments
Closed

Comments

@tikue
Copy link
Contributor

@tikue tikue commented Sep 9, 2016

See http://carllerche.github.io/bytes/bytes/trait.MutBuf.html

(And same with Deserializer / Buf / io::Read)

@tikue tikue changed the title Add a Serializer that works with bytes crate's MutBuf Add a Serializer that works with bytes crate's MutBuf instead of io::Write Sep 9, 2016
@TyOverby
Copy link
Collaborator

@TyOverby TyOverby commented Sep 10, 2016

What implementors of MutBuf aren't also io::Write?

@tikue
Copy link
Contributor Author

@tikue tikue commented Sep 10, 2016

bytes::BlockBuf only impls MutBuf and bytes::BlockBufCursor only impls Buf, presumably because their memory isn't contiguous.

@tikue
Copy link
Contributor Author

@tikue tikue commented Sep 10, 2016

Actually I'm not sure why they don't impl Read and Write, cc @carllerche?

@tikue
Copy link
Contributor Author

@tikue tikue commented Sep 10, 2016

Ah, looks like you can bridge from MutBuf to Write, so closing this!

@tikue tikue closed this Sep 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.