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

added bytes::Buf and bytes::BufMut support to Ring #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlsverre
Copy link

I would love to have native Buf and BufMut support for easier integration between vmap::Ring and prost. You can find prost here: https://github.com/tokio-rs/prost

Documentation on traits:

Happy to move the code around, add tests, or change features. Not sure how you'd like these kinds of extensions to work.

And thanks for such an awesome crate!

}

fn chunk_mut(&mut self) -> &mut UninitSlice {
UninitSlice::new(self.as_write_slice(usize::MAX))
Copy link
Author

Choose a reason for hiding this comment

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

this is probably the weirdest part of the BufMut API, but as documented here ::new is used for initialized memory. https://docs.rs/bytes/latest/bytes/buf/struct.UninitSlice.html#method.new

@kalamay
Copy link
Owner

kalamay commented Aug 13, 2024

Hey @carlsverre, thanks so much for the PR! Sorry I've been unable to get some eyes on this, but I'll take a look.

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

Successfully merging this pull request may close these issues.

2 participants