Skip to content

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

Open
carlsverre wants to merge 1 commit into
kalamay:mainfrom
carlsverre:main
Open

carlsverre wants to merge 1 commit into
kalamay:mainfrom
carlsverre:main

Conversation

@carlsverre

Copy link
Copy Markdown

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!

Comment thread src/io/bytes.rs
}

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

Copy link
Copy Markdown
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

kalamay commented Aug 13, 2024

Copy link
Copy Markdown
Owner

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